mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
dix: NULL-protect AllocGlyphCursor()
Return error to the client if sourcefont turns out to be NULL for whatever reason. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -339,7 +339,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar,
|
||||
|
||||
rc = dixLookupResourceByType((void **) &sourcefont, source, X11_RESTYPE_FONT,
|
||||
client, DixUseAccess);
|
||||
if (rc != Success) {
|
||||
if ((rc != Success) || (!sourcefont)) {
|
||||
client->errorValue = source;
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user