From 31f32215356f3f19f5c9f0c1b4f09cba80cd1321 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 7 Feb 2004 02:21:31 +0000 Subject: [PATCH] Added missing parameter check in SetLocaleInfoA revealed by the profile code changes. --- dlls/kernel/locale.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/kernel/locale.c b/dlls/kernel/locale.c index 1dbad3f28bb..ed771e7318c 100644 --- a/dlls/kernel/locale.c +++ b/dlls/kernel/locale.c @@ -1034,6 +1034,12 @@ BOOL WINAPI SetLocaleInfoA(LCID lcid, LCTYPE lctype, LPCSTR data) lcid = ConvertDefaultLocale(lcid); if (!(lctype & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( lcid ); + + if (!data) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } len = MultiByteToWideChar( codepage, 0, data, -1, NULL, 0 ); if (!(strW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) {