mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00:00
hopefully fixing unreprodceable segfault when overreading the end if error_resilience==-1 (it didnt overread here though)
Originally committed as revision 841 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0a6baf39cb
commit
159d10fc2c
@ -1859,7 +1859,8 @@ static inline int msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
|
||||
if (i > 62){
|
||||
i-= 192;
|
||||
if(i&(~63)){
|
||||
if((i+192 == 64 && level/qmul==-1) || s->error_resilience<0){
|
||||
const int left= s->gb.size*8 - get_bits_count(&s->gb);
|
||||
if(((i+192 == 64 && level/qmul==-1) || s->error_resilience<0) && left>=0){
|
||||
fprintf(stderr, "ignoring overflow at %d %d\n", s->mb_x, s->mb_y);
|
||||
break;
|
||||
}else{
|
||||
|
Loading…
Reference in New Issue
Block a user