This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new fd625f452c avfilter/f_metadata: avoid overread on long formatted output
fd625f452c is described below
commit fd625f452c0b59a61b81833de9f65a7b601a862c
Author: Yongqiang Tian <[email protected]>
AuthorDate: Thu Sep 3 12:09:55 2026 +0000
Commit: michaelni <[email protected]>
CommitDate: Tue Sep 15 01:13:33 2026 +0000
avfilter/f_metadata: avoid overread on long formatted output
vsnprintf() returns the number of characters that would have been written
when its output is truncated. Passing that value to avio_write() makes it
read beyond the 128-byte stack buffer for long metadata values.
Use avio_vprintf() to write the complete formatted string without the fixed
intermediate buffer.
Fixes: b0159af6bc76553b1ab7546d821bb8c16a666cfd
Signed-off-by: Yongqiang Tian <[email protected]>
---
libavfilter/f_metadata.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c
index a9036ab475..c2e0a50e13 100644
--- a/libavfilter/f_metadata.c
+++ b/libavfilter/f_metadata.c
@@ -199,11 +199,8 @@ static void print_file(AVFilterContext *ctx, const char
*msg, ...)
va_list argument_list;
va_start(argument_list, msg);
- if (msg) {
- char buf[128];
- int ret = vsnprintf(buf, sizeof(buf), msg, argument_list);
- avio_write(s->avio_context, buf, ret);
- }
+ if (msg)
+ avio_vprintf(s->avio_context, msg, argument_list);
va_end(argument_list);
}
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]