Commit 3e56db89 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent e92fb2be
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment