[FFmpeg-cvslog] libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.

Thierry Foucu git at videolan.org
Sat Jun 6 01:51:11 EEST 2020


ffmpeg | branch: master | Thierry Foucu <tfoucu at gmail.com> | Thu Jun  4 13:03:00 2020 -0700| [d5422a14e2a84e4feb7124c7e4d1950fdae697aa] | committer: Michael Niedermayer

libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.

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 at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5422a14e2a84e4feb7124c7e4d1950fdae697aa
---

 libavcodec/png_parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/png_parser.c b/libavcodec/png_parser.c
index 74f2964118..9ec8551a1b 100644
--- a/libavcodec/png_parser.c
+++ b/libavcodec/png_parser.c
@@ -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;



More information about the ffmpeg-cvslog mailing list