avcodec/vc1: reset fcm/field_mode in non advanced header parsing
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Feb 2014 18:04:37 +0000 (19:04 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 10 Mar 2014 17:51:50 +0000 (18:51 +0100)
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>
(cherry picked from commit b51e9354772de446e8196dabf9aad1567b22f74d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/vc1.c

index daf6325..e84cc0f 100644 (file)
@@ -578,6 +578,8 @@ int vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
 {
     int pqindex, lowquant, status;
 
+    v->field_mode = 0;
+    v->fcm = 0;
     if (v->finterpflag)
         v->interpfrm = get_bits1(gb);
     skip_bits(gb, 2); //framecnt unused