[FFmpeg-cvslog] dnxhdenc: check negative index

Vittorio Giovara git at videolan.org
Thu Nov 13 13:04:20 CET 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Tue Nov 11 13:27:03 2014 +0100| [e3f50f247155216229e34f165bae8c329d5a001e] | committer: Vittorio Giovara

dnxhdenc: check negative index

CC: libav-stable at libav.org
Bug-Id: CID 700464

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3f50f247155216229e34f165bae8c329d5a001e
---

 libavcodec/dnxhdenc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 4294510..c49ad7e 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;



More information about the ffmpeg-cvslog mailing list