mirror of https://git.ffmpeg.org/ffmpeg.git
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: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
75b854adbd
commit
8dd0c12648
|
@ -87,6 +87,8 @@ void ff_mjpegenc_huffman_compute_bits(PTable *prob_table, HuffTable *distincts,
|
||||||
|
|
||||||
int min;
|
int min;
|
||||||
|
|
||||||
|
av_assert0(max_length > 0);
|
||||||
|
|
||||||
to->nitems = 0;
|
to->nitems = 0;
|
||||||
from->nitems = 0;
|
from->nitems = 0;
|
||||||
to->item_idx[0] = 0;
|
to->item_idx[0] = 0;
|
||||||
|
|
Loading…
Reference in New Issue