diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2025-08-06 00:36:10 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2025-08-11 01:25:05 +0000 |
commit | 3bf8bf965fb69f873e52d34a85d1ecb722a9fe7f (patch) | |
tree | aa4916b12bae29e4d077d0b93eff4fe04057efa9 | |
parent | cd83161ff66876756674e61eded8ff350aca2e28 (diff) | |
download | ffmpeg-3bf8bf965fb69f873e52d34a85d1ecb722a9fe7f.tar.gz |
avformat/mov: clear old name from infe
heif_items are reused and to avoid leaking memory or using stale name,
clear it first.
Fixes: 432505829/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6654363487764480
Found-by: OSS-Fuzz
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
-rw-r--r-- | libavformat/mov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 94b741f056..86037c6712 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8957,6 +8957,7 @@ static int mov_read_infe(MOVContext *c, AVIOContext *pb, MOVAtom atom) return AVERROR(ENOMEM); } + av_freep(&item->name); av_bprint_finalize(&item_name, ret ? &item->name : NULL); item->item_id = item_id; item->type = item_type; |