Commit 73f7bf57 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

kernel32: Handle NULL locale name in IsValidLocaleName().

parent 9f5a9509
......@@ -2656,6 +2656,9 @@ BOOL WINAPI IsValidLocaleName( LPCWSTR locale )
{
struct locale_name locale_name;
if (!locale)
return FALSE;
/* string parsing */
parse_locale_name( locale, &locale_name );
......
......@@ -4179,6 +4179,8 @@ static void test_IsValidLocaleName(void)
ok(!ret, "IsValidLocaleName should have failed\n");
ret = pIsValidLocaleName(LOCALE_NAME_INVARIANT);
ok(ret, "IsValidLocaleName failed\n");
ret = pIsValidLocaleName(NULL);
ok(!ret, "IsValidLocaleName should have failed\n");
}
static void test_CompareStringOrdinal(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment