mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-19 06:38:26 +02:00
Xi: don't crash on a NULL property name, just return None.
strcmp doesn't like NULL-pointers.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 0d9a42dc03)
This commit is contained in:
parent
ea9f51fd42
commit
124da1da5c
1 changed files with 6 additions and 0 deletions
|
|
@ -58,11 +58,17 @@ static long XIPropHandlerID = 1;
|
|||
/**
|
||||
* Return the type assigned to the specified atom or 0 if the atom isn't known
|
||||
* to the DIX.
|
||||
*
|
||||
* If name is NULL, None is returned.
|
||||
*/
|
||||
_X_EXPORT Atom
|
||||
XIGetKnownProperty(char *name)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!name)
|
||||
return None;
|
||||
|
||||
for (i = 0; i < (sizeof(dev_properties)/sizeof(struct dev_properties)); i++)
|
||||
{
|
||||
if (strcmp(name, dev_properties[i].name) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue