Added missing parameter check in SetLocaleInfoA revealed by the

profile code changes.
This commit is contained in:
Alexandre Julliard 2004-02-07 02:21:31 +00:00
parent e7ad75adf4
commit 31f3221535
1 changed files with 6 additions and 0 deletions

View File

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