diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-22 16:41:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-06 00:54:40 +0200 |
commit | 0d40fbaef09b62ea01ac1cd1ebaaa045ad285e9d (patch) | |
tree | 7b70ec5b630123fe29a2071850e2fd9a873601ae | |
parent | a4846943a3566723976ecd67a57f381b76e80e29 (diff) | |
download | ffmpeg-0d40fbaef09b62ea01ac1cd1ebaaa045ad285e9d.tar.gz |
iff: fix null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 41abc9da50ba7a7b68bbbf6622475ce7a3c72e3f)
-rw-r--r-- | libavcodec/iff.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 24167c722c..978507bbe3 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -473,7 +473,7 @@ static int decode_frame_ilbm(AVCodecContext *avctx, } else if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) { av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return res; - } else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt != PIX_FMT_GRAY8) { + } else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt == PIX_FMT_PAL8) { if ((res = ff_cmap_read_palette(avctx, (uint32_t*)s->frame.data[1])) < 0) return res; } |