summaryrefslogtreecommitdiffstats
path: root/libavcodec/snow.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-25 14:26:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-25 14:36:41 +0200
commitb2955b6c5aed11026ec5c7164462899a10cdb937 (patch)
tree87915428d8b22236863b447290d6d28a809ef01e /libavcodec/snow.h
parent9458a62decfcaa1313b1ba69276466de536d0768 (diff)
downloadffmpeg-streaming-b2955b6c5aed11026ec5c7164462899a10cdb937.zip
ffmpeg-streaming-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/snow.h b/libavcodec/snow.h
index bf744cf..a794da6 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;
OpenPOWER on IntegriCloud