mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
fix segfault with darkkben.free.fr/corrupted_h264.mp4
Originally committed as revision 7671 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
79a5b35c05
commit
08eb8fcdbf
@ -4889,8 +4889,8 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
|
||||
|
||||
if(total_coeff==0)
|
||||
return 0;
|
||||
if(total_coeff<0) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "corrupted macroblock %d %d (total_coeff<0)\n", s->mb_x, s->mb_y);
|
||||
if(total_coeff > (unsigned)max_coeff) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "corrupted macroblock %d %d (total_coeff=%d)\n", s->mb_x, s->mb_y, total_coeff);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user