[FFmpeg-devel] avformat/matroskadec: Do not leak queued packets on sync errors

Submitted by Michael Niedermayer on Feb. 8, 2019, 9:53 p.m.

Details

Message ID 20190208215352.16268-1-michael@niedermayer.cc
State Accepted
Commit d1afa7284c3feba4debfebf1b9cf8ad67640e34a
Headers show

Commit Message

Michael Niedermayer Feb. 8, 2019, 9:53 p.m.
Fixes: memleak
Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280

Reported-by: Chris Cunningham <chcunningham@google.com>
Tested-by: Chris Cunningham <chcunningham@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/matroskadec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer Feb. 17, 2019, 8:39 a.m.
On Fri, Feb 08, 2019 at 10:53:52PM +0100, Michael Niedermayer wrote:
> Fixes: memleak
> Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-5649187601121280
> 
> Reported-by: Chris Cunningham <chcunningham@google.com>
> Tested-by: Chris Cunningham <chcunningham@google.com>
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/matroskadec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 4ad99db7db..d7881d9c1d 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3541,7 +3541,7 @@  static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt)
             ret = matroska_resync(matroska, pos);
     }
 
-    return ret;
+    return 0;
 }
 
 static int matroska_read_seek(AVFormatContext *s, int stream_index,