diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-07 03:49:06 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-20 03:41:33 +0200 |
commit | d2dba39204f4fe041d2b2641c401382dba0fdfea (patch) | |
tree | 45f63f55eae63ebd46083bf8911c9d61fe46097e /libavcodec | |
parent | 91394cc4da15abb0cb6c1f7b8dba6b87bf587d13 (diff) | |
download | ffmpeg-d2dba39204f4fe041d2b2641c401382dba0fdfea.tar.gz |
avcodec/targa_y216dec: Fix width type
Fixes out of array access
Fixes: 1376/clusterfuzz-testcase-minimized-6361794975105024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e56db892600c2fbe34782c6140f1ee832a2c344)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/targa_y216dec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/targa_y216dec.c b/libavcodec/targa_y216dec.c index 21b3d35d67..443d48a92f 100644 --- a/libavcodec/targa_y216dec.c +++ b/libavcodec/targa_y216dec.c @@ -35,7 +35,8 @@ static int y216_decode_frame(AVCodecContext *avctx, void *data, { AVFrame *pic = data; const uint16_t *src = (uint16_t *)avpkt->data; - uint16_t *y, *u, *v, aligned_width = FFALIGN(avctx->width, 4); + uint16_t *y, *u, *v; + int aligned_width = FFALIGN(avctx->width, 4); int i, j, ret; if (avpkt->size < 4 * avctx->height * aligned_width) { |