mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 06:30:37 +00:00
Added missing parameter check in SetLocaleInfoA revealed by the
profile code changes.
This commit is contained in:
parent
e7ad75adf4
commit
31f3221535
@ -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) )))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user