]> git.sesse.net Git - ffmpeg/commitdiff
libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
authorThierry Foucu <tfoucu@gmail.com>
Thu, 4 Jun 2020 20:03:00 +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
png parser cannot combine the frame, the poutbuf is not set.

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

index 74f296411810f9624fe5573ec211c8ff8c02bf47..9ec8551a1b7b7c12d658502477d25972bbd8fae9 100644 (file)
@@ -45,6 +45,7 @@ static int png_parse(AVCodecParserContext *s, AVCodecContext *avctx,
     s->pict_type = AV_PICTURE_TYPE_NONE;
 
     *poutbuf_size = 0;
+    *poutbuf = NULL;
 
     if (!ppc->pc.frame_start_found) {
         uint64_t state64 = ppc->pc.state64;