Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-07-19 23:34:21 +0400
committerLuca Barbato <lu_zero@gentoo.org>2013-07-20 00:14:07 +0400
commitfd8189932147a524fe43532b46baa35e8be92a1b (patch)
tree72d3eee33e6e4348042a7396941c9961aac4b66b /libavcodec
parentdd0bfc3a6a310e3e3674ce7742672d689a9a0e93 (diff)
dsicinav: Clip the source size to the expected maximum
A packet larger than cin->bitmap_size does not make sense. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/dsicinav.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index afcb8ef7ff..85148ea5ae 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -243,6 +243,8 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
}
}
+ bitmap_frame_size = FFMIN(cin->bitmap_size, bitmap_frame_size);
+
/* note: the decoding routines below assumes that
* surface.width = surface.pitch */
switch (bitmap_frame_type) {