projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3db3fdf
)
xan: Prevent NULL dereference with missing palette
author
Laurent Aimar
<fenrir@videolan.org>
Thu, 29 Sep 2011 03:12:07 +0000
(
03:12
+0000)
committer
Janne Grunau
<janne-libav@jannau.net>
Fri, 7 Oct 2011 15:15:31 +0000
(17:15 +0200)
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
libavcodec/xan.c
patch
|
blob
|
history
diff --git
a/libavcodec/xan.c
b/libavcodec/xan.c
index
3965617
..
54d6d15
100644
(file)
--- a/
libavcodec/xan.c
+++ b/
libavcodec/xan.c
@@
-553,6
+553,11
@@
static int xan_decode_frame(AVCodecContext *avctx,
}
buf_size = buf_end - buf;
}
+ if (s->palettes_count <= 0) {
+ av_log(s->avctx, AV_LOG_ERROR, "No palette found\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if ((ret = avctx->get_buffer(avctx, &s->current_frame))) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;