diff mbox

[FFmpeg-devel,4/6] avformat/rmdec: Do not pass mime type in rm_read_multi() to ff_rm_read_mdpr_codecdata()

Message ID 20180703210530.7493-4-michael@niedermayer.cc
State Accepted
Commit a7e032a277452366771951e29fd0bf2bd5c029f0
Headers show

Commit Message

Michael Niedermayer July 3, 2018, 9:05 p.m. UTC
Fixes: use after free()
Fixes: rmdec-crash-ffe85b4cab1597d1cfea6955705e53f1f5c8a362

Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/rmdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer July 5, 2018, 12:03 p.m. UTC | #1
On Tue, Jul 03, 2018 at 11:05:28PM +0200, Michael Niedermayer wrote:
> Fixes: use after free()
> Fixes: rmdec-crash-ffe85b4cab1597d1cfea6955705e53f1f5c8a362
> 
> Found-by: Paul Ch <paulcher@icloud.com>
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/rmdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
diff mbox

Patch

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index ac61723c66..0216003e88 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -522,7 +522,7 @@  static int rm_read_multi(AVFormatContext *s, AVIOContext *pb,
 
         size2 = avio_rb32(pb);
         ret = ff_rm_read_mdpr_codecdata(s, s->pb, st2, st2->priv_data,
-                                        size2, mime);
+                                        size2, NULL);
         if (ret < 0)
             return ret;
     }