diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-25 14:26:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-25 14:36:41 +0200 |
commit | b2955b6c5aed11026ec5c7164462899a10cdb937 (patch) | |
tree | 87915428d8b22236863b447290d6d28a809ef01e /libavcodec/snow.h | |
parent | 9458a62decfcaa1313b1ba69276466de536d0768 (diff) | |
download | ffmpeg-b2955b6c5aed11026ec5c7164462899a10cdb937.tar.gz |
avcodec/rangecoder: Check e
Fixes hang.nut
Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/snow.h')
-rw-r--r-- | libavcodec/snow.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/snow.h b/libavcodec/snow.h index bf744cf7bd..a794da66b5 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -564,6 +564,8 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){ e= 0; while(get_rac(c, state+1 + FFMIN(e,9))){ //1..10 e++; + if (e > 31) + return AVERROR_INVALIDDATA; } a= 1; |