Piotr Caban : msvcrt: Pass correct buffer size to snwprintf in DoMessageBoxW helper.
Module: wine Branch: master Commit: 7ba79ca9d2e67e92fc39f46a606583bfb7c99798 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7ba79ca9d2e67e92fc39f46a60... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Dec 27 14:09:36 2016 +0100 msvcrt: Pass correct buffer size to snwprintf in DoMessageBoxW helper. Spotted by Nikolay. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/exit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/exit.c b/dlls/msvcrt/exit.c index 318bafb..9fd373e 100644 --- a/dlls/msvcrt/exit.c +++ b/dlls/msvcrt/exit.c @@ -121,7 +121,8 @@ static void DoMessageBoxW(const MSVCRT_wchar_t *lead, const MSVCRT_wchar_t *mess MSVCRT_wchar_t text[2048]; INT ret; - MSVCRT__snwprintf(text,sizeof(text),message_format, lead, MSVCRT__wpgmptr, message); + MSVCRT__snwprintf(text, sizeof(text)/sizeof(text[0]), message_format, + lead, MSVCRT__wpgmptr, message); msgbox.cbSize = sizeof(msgbox); msgbox.hwndOwner = GetActiveWindow();
participants (1)
-
Alexandre Julliard