[FFmpeg-cvslog] vc1_parser: fix NULL pointer dereference

Michael Niedermayer git at videolan.org
Thu Dec 1 18:47:09 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Dec  1 18:35:58 2011 +0100| [b50be4e38dc83389925dc14f24fa11e660d32197] | committer: Michael Niedermayer

vc1_parser: fix NULL pointer dereference
Fixes Ticket456

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b50be4e38dc83389925dc14f24fa11e660d32197
---

 libavcodec/vc1.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 0dbe48d..775caa6 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -896,6 +896,8 @@ int vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
     v->rnd = get_bits1(gb);
     if (v->interlace)
         v->uvsamp = get_bits1(gb);
+    if(!ff_vc1_bfraction_vlc.table)
+        return 0; //parsing only, vlc tables havnt been allocated
     if (v->field_mode) {
         if (!v->refdist_flag)
             v->refdist = 0;



More information about the ffmpeg-cvslog mailing list