commit | 334a4859689718cc6afd15169d2fa57e0e5fd596 | [log] [tgz] |
---|---|---|
author | Camilla Löwy <elmindreda@elmindreda.org> | Mon Apr 15 15:33:47 2019 +0200 |
committer | Camilla Löwy <elmindreda@elmindreda.org> | Mon Apr 15 15:35:19 2019 +0200 |
tree | 40af58c877ab8185291d66502655cfdffec78bea | |
parent | 0e74265426591a9b1e61deef224f920e3b54fd01 [diff] |
Win32: Fix potential buffer overrun Found with VS static analysis.
diff --git a/src/win32_init.c b/src/win32_init.c index 78592cc..ff81307 100644 --- a/src/win32_init.c +++ b/src/win32_init.c
@@ -452,7 +452,7 @@ GetLastError() & 0xffff, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buffer, - sizeof(buffer), + sizeof(buffer) / sizeof(WCHAR), NULL); WideCharToMultiByte(CP_UTF8, 0, buffer, -1, message, sizeof(message), NULL, NULL);