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 <michaelni@gmx.at>2013-10-11 18:48:10 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-10-11 18:48:26 +0400
commite7fa0417b31a671f5c7bb27f7f30f9acfcf4cfab (patch)
treeeb88834a09316da791e9b07dd06c544b3d89f972 /libavcodec/proresdec_lgpl.c
parentf02bab6d09781a7d1557e18f98ed08ea7af2aca7 (diff)
parentc0de9a23c7080e2fac8f879b9d9a0ce2b64ea953 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: prores: Reject negative run and level values See: 93c220e895a417e88a6be7df85e250c5c3f675b6 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/proresdec_lgpl.c')
-rw-r--r--libavcodec/proresdec_lgpl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index 627f98fa1c..a57429d70f 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -394,12 +394,16 @@ static inline int decode_ac_coeffs(GetBitContext *gb, int16_t *out,
return 0;
run = decode_vlc_codeword(gb, ff_prores_ac_codebook[run_cb_index]);
+ if (run < 0)
+ return AVERROR_INVALIDDATA;
bits_left = get_bits_left(gb);
if (bits_left <= 0 || (bits_left <= 8 && !show_bits(gb, bits_left)))
return AVERROR_INVALIDDATA;
level = decode_vlc_codeword(gb, ff_prores_ac_codebook[lev_cb_index]) + 1;
+ if (level < 0)
+ return AVERROR_INVALIDDATA;
pos += run + 1;
if (pos >= max_coeffs)