[FFmpeg-devel] [PATCH 3/3] libavcodec/bmp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.

Thierry Foucu tfoucu at gmail.com
Thu Jun 4 23:03:27 EEST 2020


the target_dec_fuzzer is checking for the avpkt.data pointer but if the
bmp parser cannot combine the frame, the poutbuf is not set.
---
 libavcodec/bmp_parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/bmp_parser.c b/libavcodec/bmp_parser.c
index cd65f02a2e..700bf27af1 100644
--- a/libavcodec/bmp_parser.c
+++ b/libavcodec/bmp_parser.c
@@ -45,6 +45,7 @@ static int bmp_parse(AVCodecParserContext *s, AVCodecContext *avctx,
     int i = 0;
 
     *poutbuf_size = 0;
+    *poutbuf = NULL;
 
 restart:
     if (bpc->pc.frame_start_found <= 2+4+4) {
-- 
2.27.0.278.ge193c7cf3a9-goog



More information about the ffmpeg-devel mailing list