diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2010-08-17 14:05:23 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2010-08-17 14:05:23 +0000 |
commit | 4f90688b6e1d79d85ac2e065a2cf1e7e9bd665a7 (patch) | |
tree | bd08b42867700ea4e30666bf33371e1fdf727da0 /libavformat/matroskadec.c | |
parent | aa78a6d657ec180e013facacb708fd7fc2d4d25e (diff) | |
download | ffmpeg-4f90688b6e1d79d85ac2e065a2cf1e7e9bd665a7.tar.gz |
matroskadec: fix integer overflow
patch from reimar
Originally committed as revision 24803 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 60f03ce362..ab5e1d13cf 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -901,6 +901,9 @@ static int matroska_decode_buffer(uint8_t** buf, int* buf_size, int result = 0; int olen; + if (pkt_size >= 10000000) + return -1; + switch (encodings[0].compression.algo) { case MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP: return encodings[0].compression.settings.size; |