1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Merge commit '342c43d154e586bc022c86b168fe8d36f69da9d3'

* commit '342c43d154e586bc022c86b168fe8d36f69da9d3':
  omadec: Properly check lengths before incrementing the position

See: f1d6f013b2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-16 12:05:42 +02:00
commit a444ddff03

View File

@ -171,7 +171,11 @@ 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 + taglen; pos += 44;
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;