Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-08 04:34:44 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-10 14:11:15 +0300
commit8dd0c12648d838bb982ca10f384ee1f0107dfece (patch)
tree213cb2b6dd88c83e842f702d842b91a297d83bee /libavcodec/mjpegenc_huffman.c
parent75b854adbd4efeab36eba1f3fb3953951c6f2575 (diff)
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>
Diffstat (limited to 'libavcodec/mjpegenc_huffman.c')
-rw-r--r--libavcodec/mjpegenc_huffman.c2
1 files changed, 2 insertions, 0 deletions
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;