mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 13:18:04 +02:00
XOpenDisplay: ensure each screen has a valid root_visual pointer
Other code assumes this pointer cannot be NULL, so fail the connection if a bug has caused the X server to give a non-existent visual ID for the default visual of any screen. Reported-by: Gregory James DUCK <gjduck@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
3962080b78
commit
78b37accff
1 changed files with 4 additions and 0 deletions
|
|
@ -473,6 +473,10 @@ XOpenDisplay (
|
|||
}
|
||||
}
|
||||
sp->root_visual = _XVIDtoVisual(dpy, root_visualID);
|
||||
if (sp->root_visual == NULL) {
|
||||
OutOfMemory(dpy);
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if(usedbytes != setuplength){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue