xserver: Branch 'server-21.1-branch'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Feb 19 10:18:10 UTC 2024
hw/xfree86/common/xf86Mode.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit f653d9a0af912e577fab5c02b2a4eb380d33e8bb
Author: Yusuf Khan <yusisamerican at gmail.com>
Date: Sat Feb 17 12:38:10 2024 -0800
hw/xfree86: fix NULL pointer refrence to mode name
Potentially, the pointer to the mode name could be unset, this can
occur with the xf86-video-nv DDX, in that case there isnt much we can do
except check if the next mode is any better.
Signed-off-by: Yusuf Khan <yusisamerican at gmail.com>
---
(cherry picked from db3aa4e03b180244e8b4b02272c49f1e0c48b463)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1309>
diff --git a/hw/xfree86/common/xf86Mode.c b/hw/xfree86/common/xf86Mode.c
index eb0885571..ef3be84c3 100644
--- a/hw/xfree86/common/xf86Mode.c
+++ b/hw/xfree86/common/xf86Mode.c
@@ -507,6 +507,8 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
/* scan through the modes in the sort order above */
if ((p->type & type) != type)
continue;
+ if (p->name == NULL)
+ continue;
if (strcmp(p->name, modep->name) == 0) {
More information about the xorg-commit
mailing list