From 334a4859689718cc6afd15169d2fa57e0e5fd596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Mon, 15 Apr 2019 15:33:47 +0200 Subject: [PATCH] Win32: Fix potential buffer overrun Found with VS static analysis. --- src/win32_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32_init.c b/src/win32_init.c index 78592cce..ff813079 100644 --- a/src/win32_init.c +++ b/src/win32_init.c @@ -452,7 +452,7 @@ void _glfwInputErrorWin32(int error, const char* description) 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);