diff mbox series

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

Message ID 20200604200315.157718-1-tfoucu@gmail.com
State Accepted
Commit 3dc24b3379fc4f9210dee7617accc5ef43879025
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
mlp parser cannot combine the frame, the poutbuf is not set.
---
 libavcodec/mlp_parser.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Niedermayer June 5, 2020, 10:48 p.m. UTC | #1
On Thu, Jun 04, 2020 at 01:03:15PM -0700, Thierry Foucu wrote:
> the target_dec_fuzzer is checking for the avpkt.data pointer but if the
> mlp parser cannot combine the frame, the poutbuf is not set.
> ---
>  libavcodec/mlp_parser.c | 1 +
>  1 file changed, 1 insertion(+)

will apply

thx

[...]
diff mbox series

Patch

diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 5d2ddc5a70..e7162f4aa8 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -64,6 +64,7 @@  static int mlp_parse(AVCodecParserContext *s,
     s->key_frame = 0;
 
     *poutbuf_size = 0;
+    *poutbuf = NULL;
     if (buf_size == 0)
         return 0;