kernel32: Handle NULL locale name in IsValidLocaleName().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9f5a950995
commit
73f7bf57cb
@ -2656,6 +2656,9 @@ BOOL WINAPI IsValidLocaleName( LPCWSTR locale )
|
|||||||
{
|
{
|
||||||
struct locale_name locale_name;
|
struct locale_name locale_name;
|
||||||
|
|
||||||
|
if (!locale)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* string parsing */
|
/* string parsing */
|
||||||
parse_locale_name( locale, &locale_name );
|
parse_locale_name( locale, &locale_name );
|
||||||
|
|
||||||
|
@ -4179,6 +4179,8 @@ static void test_IsValidLocaleName(void)
|
|||||||
ok(!ret, "IsValidLocaleName should have failed\n");
|
ok(!ret, "IsValidLocaleName should have failed\n");
|
||||||
ret = pIsValidLocaleName(LOCALE_NAME_INVARIANT);
|
ret = pIsValidLocaleName(LOCALE_NAME_INVARIANT);
|
||||||
ok(ret, "IsValidLocaleName failed\n");
|
ok(ret, "IsValidLocaleName failed\n");
|
||||||
|
ret = pIsValidLocaleName(NULL);
|
||||||
|
ok(!ret, "IsValidLocaleName should have failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_CompareStringOrdinal(void)
|
static void test_CompareStringOrdinal(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user