[PATCH v2 xserver] Autoconfig: Fix the loop adding dectected drivers to the list of screens

Keith Packard keithp at keithp.com
Sun Jul 31 23:36:22 UTC 2016


Matthieu Herrb <matthieu at herrb.eu> writes:

> This loop was written in a buggy style, causing a NULL driver ptr to be
> passed to copyScreen(). copyScreen() only uses that to generate an
> identifier string, so this is mostly harmless on systems that accept
> NULL for asprintf() "%s" format. (the generated identifiers are off
> by one wrt the driver names and the last one contains NULL.
>
> For systems that don't accept NULL for '%s' this would cause a
> segmentation fault when this code is used (no xorg.conf, but partial
> config in xorg.conf.d for instance).
>
> Signed-off-by: Matthieu Herrb <matthieu at herrb.eu>

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160731/05996706/attachment.sig>


More information about the xorg-devel mailing list