[FFmpeg-cvslog] Prevent NULL dereferences when missing the reference frame in the xan decoder .

Laurent Aimar git at videolan.org
Wed Sep 28 01:15:32 CEST 2011


ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Sep 27 23:43:57 2011 +0200| [19e95b88459e879d3e67a66350d937c32ed762ca] | committer: Michael Niedermayer

Prevent NULL dereferences when missing the reference frame in the xan decoder.

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

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

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

diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 3e950f1..506957c 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -222,6 +222,8 @@ static inline void xan_wc3_copy_pixel_run(XanContext *s,
 
     palette_plane = s->current_frame.data[0];
     prev_palette_plane = s->last_frame.data[0];
+    if (!prev_palette_plane)
+        prev_palette_plane = palette_plane;
     stride = s->current_frame.linesize[0];
     line_inc = stride - width;
     curframe_index = y * stride + x;



More information about the ffmpeg-cvslog mailing list