From: Simon Tatham Date: Fri, 27 Nov 2015 23:55:16 +0000 (+0000) Subject: Fix a mistaken use of a format string in logevent(). X-Git-Tag: 0.67~18 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=941421b8fa669f729129e7462457c29911476b17;p=PuTTY.git 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) --- 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