Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-11-04 04:34:58 +0300
committerJames Almer <jamrial@gmail.com>2016-11-20 05:50:37 +0300
commitee5677737942ed0ab898f696d39164ee234d2f0a (patch)
tree148e52c51e2dff59d96f7469fc21145935457f7f /libavcodec/rawdec.c
parent3bd7ad58a7e167c114db6cbc01b8fa17f5e30ce4 (diff)
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)
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c2
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;
}