summaryrefslogtreecommitdiff
path: root/libavcodec/cinepak.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-03 19:33:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-03 19:34:28 +0200
commite7e5114c506957f40aafd794e06de1a7e341e9d5 (patch)
tree457d05ac24e041e893eff0bd17bdaa35d36c685c /libavcodec/cinepak.c
parente830902934a29df05c7af65aef2a480b15f572c4 (diff)
downloadffmpeg-e7e5114c506957f40aafd794e06de1a7e341e9d5.tar.gz
avcodec/cinepak: fix integer underflow
Fixes out of array access Fixes: asan_heap-oob_4da0ba_6_asan_heap-oob_4da0ba_241_cvid_crash.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cinepak.c')
-rw-r--r--libavcodec/cinepak.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index 4746289b76..f651c489bf 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -135,7 +135,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
const uint8_t *eod = (data + size);
uint32_t flag, mask;
uint8_t *cb0, *cb1, *cb2, *cb3;
- unsigned int x, y;
+ int x, y;
char *ip0, *ip1, *ip2, *ip3;
flag = 0;