Module: wine Branch: master Commit: b07129bad4b4807b1922f1ef19686e904a6a84d9 URL: https://gitlab.winehq.org/wine/wine/-/commit/b07129bad4b4807b1922f1ef19686e9...
Author: Francois Gouget fgouget@codeweavers.com Date: Mon Feb 13 19:35:22 2023 +0100
winetest: Don't use plain strings as format specifiers.
When they contain a percent character they would, at best, not be printed correctly, and at worst cause a crash.
---
programs/winetest/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 74b596b237b..18fa25db101 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -1122,7 +1122,7 @@ run_tests (char *logname, char *outdir) logfile = create_temp_file( tmpname ); logname = tmpname; } - report (R_OUT, logname); + report (R_OUT, "%s", logname);
if (logfile == INVALID_HANDLE_VALUE) report (R_FATAL, "Could not open logfile: %u", GetLastError()); @@ -1148,7 +1148,7 @@ run_tests (char *logname, char *outdir) if (!newdir && (!outdir || GetLastError() != ERROR_ALREADY_EXISTS)) report (R_FATAL, "Could not create directory %s (%d)", tempdir, GetLastError());
- report (R_DIR, tempdir); + report (R_DIR, "%s", tempdir);
xprintf ("Version 4\n"); xprintf ("Tests from build %s\n", build_id[0] ? build_id : "-" );