blob: d55d9ebe6a9eb4ff3d79fbb6dbe8a9b4ec13bdd2 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From e7e5114c506957f40aafd794e06de1a7e341e9d5 Mon Sep 17 00:00:00 2001
2From: Michael Niedermayer <michaelni@gmx.at>
3Date: Fri, 3 Oct 2014 19:33:01 +0200
4Subject: [PATCH] avcodec/cinepak: fix integer underflow
5
6(Upstream commit e7e5114c506957f40aafd794e06de1a7e341e9d5)
7
8Fixes out of array access
9Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi
10
11Upstream-status: Backport
12
13Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
14Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
15Signed-off-by: Yue Tao <yue.tao@windriver.com>
16---
17 libavcodec/cinepak.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
21index 4746289..f651c48 100644
22--- a/gst-libs/ext/libav/libavcodec/cinepak.c
23+++ b/gst-libs/ext/libav/libavcodec/cinepak.c
24@@ -125,7 +125,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
25 const uint8_t *eod = (data + size);
26 uint32_t flag, mask;
27 cvid_codebook *codebook;
28- unsigned int x, y;
29+ int x, y;
30 uint32_t iy[4];
31 uint32_t iu[2];
32 uint32_t iv[2];
33--
341.7.9.5
35