Module: libav
Branch: release/9
Commit: 068bc633f2999d81c87177acc637e11726e31926

Author:    Luca Barbato <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Fri Jul 19 21:34:21 2013 +0200

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: [email protected]
(cherry picked from commit fd8189932147a524fe43532b46baa35e8be92a1b)

Signed-off-by: Luca Barbato <[email protected]>

---

 libavcodec/dsicinav.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index 7f5c1da..772fb8d 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -244,6 +244,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) {

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to