Commit 8dd0c126 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mjpegenc_huffman: Assert length in ff_mjpegenc_huffman_compute_bits()

This should help coverity see that the issues this leads to cannot occur
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 75b854ad
......@@ -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;
......
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