mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-06 17:23:13 +00:00
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>
This commit is contained in:
parent
7e603fb322
commit
51e329918d
@ -369,7 +369,7 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
&pal_size);
|
&pal_size);
|
||||||
int ret;
|
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);
|
av_log(avctx, AV_LOG_ERROR, "Palette size %d is wrong\n", pal_size);
|
||||||
pal = NULL;
|
pal = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user