Commit 223d996a authored by Michael Niedermayer's avatar Michael Niedermayer

Fix a possibly exploitable buffer overflow.

Originally committed as revision 18640 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent f7cf12b2
...@@ -249,10 +249,9 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){ ...@@ -249,10 +249,9 @@ static inline int get_symbol(RangeCoder *c, uint8_t *state, int is_signed){
else{ else{
int i, e, a; int i, e, a;
e= 0; e= 0;
while(get_rac(c, state+1 + e)){ //1..10 while(get_rac(c, state+1 + e) && e<9){ //1..10
e++; e++;
} }
assert(e<=9);
a= 1; a= 1;
for(i=e-1; i>=0; i--){ for(i=e-1; i>=0; i--){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment