diff options
author | James Almer <jamrial@gmail.com> | 2016-11-03 22:34:58 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-11-04 23:38:56 -0300 |
commit | 51e329918dc1826de7451541cb15bef3b9bfe138 (patch) | |
tree | c3b72682c571393ad66baa3420ceb882f9fb4f8b | |
parent | 7e603fb322d19f433723e95538f1b867b15ebf40 (diff) | |
download | ffmpeg-51e329918dc1826de7451541cb15bef3b9bfe138.tar.gz |
avcodec/rawdec: check for side data before checking its size
Fixes valgrind warnings about usage of uninitialized values.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | libavcodec/rawdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 45cf27fa20..e53eb2eacc 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -369,7 +369,7 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, &pal_size); int ret; - if (pal_size != AVPALETTE_SIZE) { + if (pal && pal_size != AVPALETTE_SIZE) { av_log(avctx, AV_LOG_ERROR, "Palette size %d is wrong\n", pal_size); pal = NULL; } |