[matroska-devel] Re: Bug in libebml found

Steve Lhomme steve.lhomme at free.fr
Sun Apr 13 22:55:48 CEST 2003


John Cannon wrote:
> Steve, I want your opinion on this.  I seem to have found a fix but I am not
> quite sure if it's a valid way of doing it.  At the end of a file, the
> filter would have an assertion failure.  The source of this problem is a
> call to EbmlStream::SkipData() at line 988 of kaxdemux.cpp.  The actual
> problem lies within the libebml code however.  As you know, the previously
> mentioned method calls EbmlElement::SkipData() which has a severe problem in
> it's code.  At line 435 of EbmlElement.cpp the variable bUpperElement is
> never assigned thus creating an assertion failure when it reaches line 441.
> The assertion lies within some other code but the value of bUpperElement is
> random at all times in my debugging.  The fix that I found for it was to
> change line 435 from:
> 
> int bUpperElement;
> 
> to:
> 
> int bUpperElement = 0;
> 
> I am not sure of the inner workings of libebml but this fixed the problem
> for me as the assertion requires the value to be 0 and not a random number
> like -8765357 :)

You're right, this is a bug that you corrected.

I'll upload a version to CVS with the correction (bUpperElement is only 
needed at one level of call).

http://www.matroska.org



More information about the Matroska-devel mailing list