[MPlayer-dev-eng] [PATCH] libmpdemux/demux_audio: Skip ID3v2.4 tags.

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Mon Jan 16 21:09:13 CET 2012


Ingo,

> > +	stream_read(s,tag,4);
> > +	len += (tag[0]<<21) | (tag[1]<<14) | (tag[2]<<7) | tag[3];
> > +	demuxer->movi_end = stream_tell(s)-len;
> 
> There probably should be two other checks.
> 
> stream_tell(s)-len should not point before the beginning of the file,
> and
> there should be an ID3 v4 tag with footer flag at this position.

To be thorough, many other things could be checked:
 - major version and revision != 0xff,
 - unsynchronization of size integer (each byte has 0 as bit 8),
 - tag contents
 - ...

Is it really necessary since the stream is anyway broken if these tests
fail?

If one of the checks that you propose fails, we know that there is a
broken tag of unknown size present in the stream, so what should we do?
Abort everything with 'return 0'?

Benoît


More information about the MPlayer-dev-eng mailing list