Mercurial > libavcodec.hg
changeset 4391:20944c70a3c0 libavcodec
fix segfault with darkkben.free.fr/corrupted_h264.mp4
author | michael |
---|---|
date | Tue, 23 Jan 2007 19:32:26 +0000 |
parents | 789336787fcb |
children | e0c94f1b8f55 |
files | h264.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Tue Jan 23 13:42:09 2007 +0000 +++ b/h264.c Tue Jan 23 19:32:26 2007 +0000 @@ -4889,8 +4889,8 @@ 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; }