[FFmpeg-cvslog] avformat/mov: don't read key_size bytes twice in the keys atom
James Almer
git at videolan.org
Mon Apr 29 15:46:31 EEST 2024
ffmpeg | branch: release/7.0 | James Almer <jamrial at gmail.com> | Mon Apr 1 23:54:53 2024 -0300| [fb8f0ea7b31d78e8a14d79549a76fd71de390907] | committer: James Almer
avformat/mov: don't read key_size bytes twice in the keys atom
We only support mdta as type, yet we were not skipping other types,
but rather reading key_size worth of bytes twice per entry.
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 5a06d3810e41134ee9c2941cc0b371da62b539db)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb8f0ea7b31d78e8a14d79549a76fd71de390907
---
libavformat/mov.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d551a0f8e0..056890c85b 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5048,6 +5048,7 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom)
key_size -= 8;
if (type != MKTAG('m','d','t','a')) {
avio_skip(pb, key_size);
+ continue;
}
c->meta_keys[i] = av_mallocz(key_size + 1);
if (!c->meta_keys[i])
More information about the ffmpeg-cvslog
mailing list