mirror of https://git.videolan.org/git/ffmpeg.git
avformat/omadec: simplify checks in nprobe()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
23ad4d6f58
commit
fb45de779c
|
@ -171,11 +171,7 @@ static int nprobe(AVFormatContext *s, uint8_t *enc_header, unsigned size,
|
||||||
taglen = AV_RB32(&enc_header[pos + 32]);
|
taglen = AV_RB32(&enc_header[pos + 32]);
|
||||||
datalen = AV_RB32(&enc_header[pos + 36]) >> 4;
|
datalen = AV_RB32(&enc_header[pos + 36]) >> 4;
|
||||||
|
|
||||||
pos += 44;
|
pos += 44L + taglen;
|
||||||
if (size - pos < taglen)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
pos += taglen;
|
|
||||||
|
|
||||||
if (pos + (((uint64_t)datalen) << 4) > size)
|
if (pos + (((uint64_t)datalen) << 4) > size)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue