]> git.sesse.net Git - ffmpeg/commitdiff
libavcodec/bmp_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
authorThierry Foucu <tfoucu@gmail.com>
Thu, 4 Jun 2020 20:03:27 +0000 (13:03 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 5 Jun 2020 22:25:00 +0000 (00:25 +0200)
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.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/bmp_parser.c

index cd65f02a2e0c82901cb69a371f1f2532f93b5bcf..700bf27af1d18d27810e7f2a76715562d886b531 100644 (file)
@@ -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) {