mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 12:00:06 +01:00
omadec: Properly check lengths before incrementing the position
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit342c43d154) Signed-off-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit9eba02d5dd)
This commit is contained in:
committed by
Luca Barbato
parent
9291012d52
commit
7981b5c20e
@@ -170,7 +170,11 @@ static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size,
|
||||
taglen = AV_RB32(&enc_header[pos+32]);
|
||||
datalen = AV_RB32(&enc_header[pos+36]) >> 4;
|
||||
|
||||
pos += 44 + taglen;
|
||||
pos += 44;
|
||||
if (size - pos < taglen)
|
||||
return -1;
|
||||
|
||||
pos += taglen;
|
||||
|
||||
if (datalen << 4 > size - pos)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user