diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-11 18:16:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-11 18:16:48 +0100 |
commit | f1d6f013b2078140fb701978d720abecde7cd73f (patch) | |
tree | 4afefb2362a936e2e623c534fd3c562230fdd3a8 /libavformat/omadec.c | |
parent | 44c23aa1b85d195db6647d24e3b1d3de051790db (diff) | |
download | ffmpeg-f1d6f013b2078140fb701978d720abecde7cd73f.tar.gz |
omadec: fix len check in nprobe() prevent out of array access
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/omadec.c')
-rw-r--r-- | libavformat/omadec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/omadec.c b/libavformat/omadec.c index 1e1b980ca9..5f7669a0a7 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -159,7 +159,7 @@ static int nprobe(AVFormatContext *s, uint8_t *enc_header, int size, const uint8 taglen = AV_RB32(&enc_header[pos+32]); datalen = AV_RB32(&enc_header[pos+36]) >> 4; - if(taglen + (((uint64_t)datalen)<<4) + 44 > size) + if(pos + (uint64_t)taglen + (((uint64_t)datalen)<<4) + 44 > size) return -1; pos += 44 + taglen; |