Fix a possibly exploitable buffer overflow.
backported r18640 by michael Originally committed as revision 21712 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
This commit is contained in:
@@ -248,10 +248,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--){
|
||||||
|
Reference in New Issue
Block a user