mirror of https://git.ffmpeg.org/ffmpeg.git
id3v2: prevent unsigned integer overflow in ff_id3v2_parse()
In ff_id3v2_parse(), prevent unsigned integer overflow if data length indicator is skipped and tlen is < 4. Fix crash decoding file Allaby_cut.mp3, fix trac issue #182.
This commit is contained in:
parent
b69e5ee902
commit
64be0d1eda
|
@ -255,6 +255,8 @@ static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t
|
|||
next = avio_tell(s->pb) + tlen;
|
||||
|
||||
if (tflags & ID3v2_FLAG_DATALEN) {
|
||||
if (tlen < 4)
|
||||
break;
|
||||
avio_rb32(s->pb);
|
||||
tlen -= 4;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue