From 8f1afde11d4d76fc2444074b45d76a5113d1d748 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 14 May 2015 23:16:06 +0200 Subject: [PATCH] avcodec/diracdec: Make data_unit_size unsigned Fixes CID1271788 with this change the value is more explicitly checked, it was fully checked before though Signed-off-by: Michael Niedermayer --- libavcodec/diracdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c index b64ab95f02..0213048d3b 100644 --- a/libavcodec/diracdec.c +++ b/libavcodec/diracdec.c @@ -1933,8 +1933,9 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVFrame *picture = data; uint8_t *buf = pkt->data; int buf_size = pkt->size; - int i, data_unit_size, buf_idx = 0; + int i, buf_idx = 0; int ret; + unsigned data_unit_size; /* release unused frames */ for (i = 0; i < MAX_FRAMES; i++)