[NTUSER] Check class name existence on IntGetAtomFromStringOrAtom (#6184)

Based on I_Kill_Bugs' class_error.patch.
JIRA issue: CORE-13422, CORE-7531, CORE-18639
This commit is contained in:
Katayama Hirofumi MZ 2024-01-10 08:01:37 +09:00 committed by GitHub
parent 8b5c5fb913
commit 9a9b22aac1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1355,10 +1355,18 @@ IntGetAtomFromStringOrAtom(
} }
else else
{ {
ASSERT(IS_ATOM(ClassName->Buffer)); if (ClassName->Buffer)
{
*Atom = (RTL_ATOM)((ULONG_PTR)ClassName->Buffer); *Atom = (RTL_ATOM)((ULONG_PTR)ClassName->Buffer);
Ret = TRUE; Ret = TRUE;
} }
else
{
*Atom = 0;
EngSetLastError(ERROR_CLASS_DOES_NOT_EXIST);
Ret = FALSE;
}
}
return Ret; return Ret;
} }