[MPlayer-dev-eng] [PATCH] libmpdemux/demux_audio: Skip ID3v2.4 tags.
benoit.thebaudeau at advansee.com
Mon Jan 16 21:09:13 CET 2012
> > + stream_read(s,tag,4);
> > + len += (tag<<21) | (tag<<14) | (tag<<7) | tag;
> > + 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,
> 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
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'?
More information about the MPlayer-dev-eng