This should help coverity see that the issues this leads to cannot occur Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> --- libavcodec/mjpegenc_huffman.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/libavcodec/mjpegenc_huffman.c b/libavcodec/mjpegenc_huffman.c index ebf1311466..0e63f8066b 100644 --- a/libavcodec/mjpegenc_huffman.c +++ b/libavcodec/mjpegenc_huffman.c @@ -87,6 +87,8 @@ void ff_mjpegenc_huffman_compute_bits(PTable *prob_table, HuffTable *distincts, int min; + av_assert0(max_length > 0); + to->nitems = 0; from->nitems = 0; to->item_idx[0] = 0; -- 2.11.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel