diff mbox series

[FFmpeg-devel,1/3] libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.

Message ID 20200604200300.156597-1-tfoucu@gmail.com
State Accepted
Commit d5422a14e2a84e4feb7124c7e4d1950fdae697aa
Headers show
Series [FFmpeg-devel,1/3] libavcodec/png_parser.c: fix a use_of_uninitialized_value in target_dec_fuzzer.
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Thierry Foucu June 4, 2020, 8:03 p.m. UTC
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.
---
 libavcodec/png_parser.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Niedermayer June 5, 2020, 10:46 p.m. UTC | #1
On Thu, Jun 04, 2020 at 01:03:00PM -0700, Thierry Foucu wrote:
> 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.
> ---
>  libavcodec/png_parser.c | 1 +
>  1 file changed, 1 insertion(+)

will apply

thx

[...]
diff mbox series

Patch

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;