[FFmpeg-cvslog] omadec: fix len check in nprobe() prevent out of array access
Michael Niedermayer
git at videolan.org
Sun Nov 11 18:22:20 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 11 18:16:24 2012 +0100| [f1d6f013b2078140fb701978d720abecde7cd73f] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1d6f013b2078140fb701978d720abecde7cd73f
---
libavformat/omadec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index 1e1b980..5f7669a 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;
More information about the ffmpeg-cvslog
mailing list