avcodec/vc1: reset fcm/field_mode in non advanced header parsing

Fixes NULL pointer dereference
Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/57/head
Michael Niedermayer 11 years ago
parent dcf5bfbdb6
commit b51e935477
  1. 2
      libavcodec/vc1.c

@ -629,6 +629,8 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
{ {
int pqindex, lowquant, status; int pqindex, lowquant, status;
v->field_mode = 0;
v->fcm = 0;
if (v->finterpflag) if (v->finterpflag)
v->interpfrm = get_bits1(gb); v->interpfrm = get_bits1(gb);
if (!v->s.avctx->codec) if (!v->s.avctx->codec)

Loading…
Cancel
Save