[FFmpeg-cvslog] avfilter/f_metadata: use the return value of vsnprintf() to write the argument list
James Almer
git at videolan.org
Tue Jul 22 15:52:34 EEST 2025
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Jul 19 00:36:51 2025 -0300| [b0159af6bc76553b1ab7546d821bb8c16a666cfd] | committer: James Almer
avfilter/f_metadata: use the return value of vsnprintf() to write the argument list
Should fix use-of-uninitialized-value under MSAN.
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0159af6bc76553b1ab7546d821bb8c16a666cfd
---
libavfilter/f_metadata.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c
index f4e4aa312d..a9036ab475 100644
--- a/libavfilter/f_metadata.c
+++ b/libavfilter/f_metadata.c
@@ -201,8 +201,8 @@ static void print_file(AVFilterContext *ctx, const char *msg, ...)
va_start(argument_list, msg);
if (msg) {
char buf[128];
- vsnprintf(buf, sizeof(buf), msg, argument_list);
- avio_write(s->avio_context, buf, av_strnlen(buf, sizeof(buf)));
+ int ret = vsnprintf(buf, sizeof(buf), msg, argument_list);
+ avio_write(s->avio_context, buf, ret);
}
va_end(argument_list);
}
More information about the ffmpeg-cvslog
mailing list