This fixes a hypothetical integer overflow
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/vp3.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 33be345c14..1d83753314 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -951,9 +951,11 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext
*gb,
Vp3Fragment *all_fragments = s->all_fragments;
VLC_TYPE(*vlc_table)[2] = table->table;
- if (num_coeffs < 0)
+ if (num_coeffs < 0) {
av_log(s->avctx, AV_LOG_ERROR,
"Invalid number of coefficients at level %d\n", coeff_index);
+ return AVERROR_INVALIDDATA;
+ }
if (eob_run > num_coeffs) {
coeff_i =
--
2.16.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel