From 19e95b88459e879d3e67a66350d937c32ed762ca Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Tue, 27 Sep 2011 23:43:57 +0200 Subject: Prevent NULL dereferences when missing the reference frame in the xan decoder. Signed-off-by: Michael Niedermayer --- libavcodec/xan.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/xan.c') diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 3e950f1466..506957cc08 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; -- cgit v1.2.3