aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpc8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-16 21:47:09 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-16 21:50:17 +0100
commitbd953f94044eec49142d3d61993682f8b2186613 (patch)
tree0897070724eff4c17732c2cac1ab80a4cc9312b1 /libavformat/mpc8.c
parent9e96051d5d03c13692090bff5c804fa5aaa11375 (diff)
parent486c45767587151b517bb6fde602d43d178da203 (diff)
downloadffmpeg-bd953f94044eec49142d3d61993682f8b2186613.tar.gz
Merge commit '486c45767587151b517bb6fde602d43d178da203' into release/0.10
* commit '486c45767587151b517bb6fde602d43d178da203': mpc8: Check the seek table size parsed from the bitstream zmbvdec: Check the buffer size for uncompressed data ape: Don't allow the seektable to be omitted shorten: Break out of loop looking for fmt chunk if none is found shorten: Use a checked bytestream reader for the wave header smacker: Make sure we don't fill in huffman codes out of range Conflicts: libavcodec/shorten.c libavcodec/smacker.c libavcodec/zmbv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpc8.c')
-rw-r--r--libavformat/mpc8.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 01c1cc725b..4117d03e5a 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -143,6 +143,10 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
av_log(s, AV_LOG_ERROR, "No seek table at given position\n");
return;
}
+ if (size < 0 || size >= INT_MAX / 2) {
+ av_log(s, AV_LOG_ERROR, "Bad seek table size\n");
+ return;
+ }
if(!(buf = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE)))
return;
avio_read(s->pb, buf, size);