[FFmpeg-cvslog] avcodec/rawdec: check for side data before checking its size
James Almer
git at videolan.org
Sat Nov 5 04:40:36 EET 2016
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Nov 3 22:34:58 2016 -0300| [51e329918dc1826de7451541cb15bef3b9bfe138] | committer: James Almer
avcodec/rawdec: check for side data before checking its size
Fixes valgrind warnings about usage of uninitialized values.
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=51e329918dc1826de7451541cb15bef3b9bfe138
---
libavcodec/rawdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 45cf27f..e53eb2e 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;
}
More information about the ffmpeg-cvslog
mailing list