From 941421b8fa669f729129e7462457c29911476b17 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 27 Nov 2015 23:55:16 +0000 Subject: [PATCH] Fix a mistaken use of a format string in logevent(). logevent() doesn't do printf-style formatting (though the logeventf wrapper in ssh.c does), so if you need to format a message, it has to be done separately with dupprintf. (cherry picked from commit 1659cf3f1455f7e3d9c97a66f90a0cfa914d1ce3) --- windows/window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/windows/window.c b/windows/window.c index bcb0d9ca..03325054 100644 --- a/windows/window.c +++ b/windows/window.c @@ -398,8 +398,10 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) #ifndef UNPROTECT char *error = NULL; if (! setprocessacl(error)) { - logevent(NULL, "Could not restrict process ACL: %s", - error); + char *message = dupprintf("Could not restrict process ACL: %s", + error); + logevent(NULL, message); + sfree(message); sfree(error); } #endif -- 2.45.2