mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-17 06:39:50 +00:00
xserver: fix an off-by-one error that lead to asprintf("%s", NULL)
reported by deraadt@, fix reviewed in X.Org by Keith Packard.
This commit is contained in:
@@ -395,8 +395,7 @@ autoConfigDevice(GDevPtr preconf_device)
|
|||||||
|
|
||||||
/* for each other driver found, copy the first screen, insert it
|
/* for each other driver found, copy the first screen, insert it
|
||||||
* into the list of screens and set the driver */
|
* into the list of screens and set the driver */
|
||||||
i = 0;
|
for (i = 1; i < num_matches; i++) {
|
||||||
while (i++ < num_matches) {
|
|
||||||
if (!copyScreen(slp[0].screen, ptr, i, matches[i]))
|
if (!copyScreen(slp[0].screen, ptr, i, matches[i]))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user