aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-11-03 22:34:58 -0300
committerJames Almer <jamrial@gmail.com>2016-12-05 14:57:01 -0300
commita1d9c17368706e8a6293782b70dc7398a72b842a (patch)
treef62ad08642958ef1a708019b602cec696fde78d1
parentf788507607ad9719c158c94cc58704048ac83f89 (diff)
downloadffmpeg-a1d9c17368706e8a6293782b70dc7398a72b842a.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> (cherry picked from commit 51e329918dc1826de7451541cb15bef3b9bfe138)
-rw-r--r--libavcodec/rawdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 2d348daca3..ca0927ca1b 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;
}