Bug 6352

Summary: missing check for NULL pointer in os/access.c
Product: xorg Reporter: Sascha Hauer <s.hauer>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: high    
Version: 7.0.0   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Sascha Hauer 2006-03-23 01:45:42 UTC
The xorg server crashes when interfaces are present in the system which
don't have an interface address assigned. ConvertAddr() in os/access.c
needs to check for a NULL pointer in sadr. Possible patch below.

Index: xorg-server-X11R7.0-1.0.1/os/access.c
===================================================================
--- xorg-server-X11R7.0-1.0.1.orig/os/access.c
+++ xorg-server-X11R7.0-1.0.1/os/access.c
@@ -1858,6 +1858,8 @@ ConvertAddr (
 {
     if (*len == 0)
         return (FamilyLocal);
+    if (!saddr)
+        return -1;
     switch (saddr->sa_family)
     {
     case AF_UNSPEC:
Comment 1 Adam Jackson 2006-03-23 07:58:46 UTC

*** This bug has been marked as a duplicate of 5218 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.