1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

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.
This commit is contained in:
Simon Tatham 2015-11-27 23:55:16 +00:00
parent 6bea4b2502
commit 1659cf3f14

View File

@ -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