diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-07-19 21:34:21 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-10-28 14:16:37 +0100 |
commit | b8ba48c725dcda56d5dccc1474322857a7e3ed13 (patch) | |
tree | 0015cff7c42354f9a9f4d483ff8be529270ea55a /libavcodec | |
parent | 1682c9fb595d72e1502c94804c3bb53c35348c0d (diff) | |
download | ffmpeg-b8ba48c725dcda56d5dccc1474322857a7e3ed13.tar.gz |
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
(cherry picked from commit fd8189932147a524fe43532b46baa35e8be92a1b)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/dsicinav.c
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dsicinav.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c index 108424c858..03bdeaf359 100644 --- a/libavcodec/dsicinav.c +++ b/libavcodec/dsicinav.c @@ -234,6 +234,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) { case 9: |