From e3f50f247155216229e34f165bae8c329d5a001e Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Tue, 11 Nov 2014 13:27:03 +0100 Subject: [PATCH] dnxhdenc: check negative index CC: libav-stable@libav.org Bug-Id: CID 700464 --- libavcodec/dnxhdenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 42945107dd..c49ad7eb39 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -299,6 +299,8 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "cid %d\n", ctx->cid); index = ff_dnxhd_get_cid_table(ctx->cid); + if (index < 0) + return index; ctx->cid_table = &ff_dnxhd_cid_table[index]; ctx->m.avctx = avctx;