Mercurial > libavcodec.hg
changeset 4851:ba6fd4b884b6 libavcodec
correct another possible buffer overflow where interlaced would
get stuck to 1 but then width/height would change and interlaced
wouldnt be reset ...
author | michael |
---|---|
date | Sat, 14 Apr 2007 22:05:12 +0000 |
parents | 9e471439d2e8 |
children | 8b92d313409d |
files | mjpeg.c |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mjpeg.c Sat Apr 14 18:58:26 2007 +0000 +++ b/mjpeg.c Sat Apr 14 22:05:12 2007 +0000 @@ -1171,6 +1171,7 @@ s->width = width; s->height = height; + s->interlaced = 0; /* test interlaced mode */ if (s->first_picture && @@ -2258,8 +2259,6 @@ skip_bits(&hgb, 32); /* padded field size */ second_field_offs = get_bits_long(&hgb, 32); av_log(avctx, AV_LOG_DEBUG, "second field offs: 0x%x\n", second_field_offs); - if (second_field_offs) - s->interlaced = 1; dqt_offs = get_bits_long(&hgb, 32); av_log(avctx, AV_LOG_DEBUG, "dqt offs: 0x%x\n", dqt_offs);