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);
|
lcid = ConvertDefaultLocale(lcid);
|
||||||
|
|
||||||
if (!(lctype & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( 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 );
|
len = MultiByteToWideChar( codepage, 0, data, -1, NULL, 0 );
|
||||||
if (!(strW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
|
if (!(strW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue