Commit 51e32991 authored by James Almer's avatar James Almer

avcodec/rawdec: check for side data before checking its size

Fixes valgrind warnings about usage of uninitialized values.
Reviewed-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 7e603fb3
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment