Small patch for xserver

Daniel Stone daniel at
Sat Dec 2 14:22:34 PST 2006

On Sat, Dec 02, 2006 at 11:31:15AM -0800, Kean Johnston wrote:
> Attached is a small patch for the X server I would dearly like to see
> go in before 7.2. It checks for a NULL return before calling a function
> with the NULL list, which causes a SIGSEGV, which can leave the console
> truly hosed.

Aside from the 0 != NULL bit and FORTRAN style, you appear to be looking
at quite an old codebase:

commit 354086d7e8e13fc7acbcc6603ca2a03c8cc806ee
Author: Jeremy C. Reed <reed at>
Date:   Thu May 25 23:32:33 2006 +0000

    Don't do fixup_video_driver_list if no drivers. (I had signal 11 and core
        dump when drivers not installed yet.)
    TODO: fix fixup_video_driver_list to handle NULL argument.

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 78e6033..42e7d87 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -510,7 +510,7 @@ #ifdef XFree86LOADER
     ret = LoaderListDirs(subdirs, patlist);
     /* fix up the probe order for video drivers */
-    if (strstr(dirname, "drivers"))
+    if (strstr(dirname, "drivers") && ret != NULL)
     return ret;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <>

More information about the xorg mailing list