diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-28 01:43:57 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-28 02:49:25 +0400 |
commit | 19e95b88459e879d3e67a66350d937c32ed762ca (patch) | |
tree | 31c17de93777c005e470ace4a30cd949e099a730 /libavcodec/xan.c | |
parent | 039f3c33fffd2f4ae376b662ea4ec67c1d6a4c04 (diff) |
Prevent NULL dereferences when missing the reference frame in the xan decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/xan.c')
-rw-r--r-- | libavcodec/xan.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |