netbsd-bugs@netbsd.org
[Top] [All Lists]

xsrc/29155: xf86cfg core dumps when configure a screen with no options

Subject: xsrc/29155: xf86cfg core dumps when configure a screen with no options
From:
Date: Sat, 29 Jan 2005 23:57:01 +0000 UTC
>Number:         29155
>Category:       xsrc
>Synopsis:       xf86cfg core dumps when configure a screen with no options
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 29 23:57:01 +0000 2005
>Originator:     David Laight
>Release:        NetBSD 2.0
>Organization:
        netbsd
>Environment:
        2.0 and current sources as of Jan 29 2005
Machine: i386
>Description:
        If xf86cfg is used (haha) to configure X on a system where the
        driver has no options (eg ati), then it core dumps when you try to
        add screen resolutions.
>How-To-Repeat:
>Fix:
Index: screen-cfg.c
===================================================================
RCS file: 
/cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/xf86cfg/screen-cfg.c,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 screen-cfg.c
--- screen-cfg.c        5 Mar 2004 14:29:31 -0000       1.1.1.6
+++ screen-cfg.c        29 Jan 2005 23:47:43 -0000
@@ -498,7 +498,7 @@ ScreenDialog(XF86SetupInfo *info)
                strcmp(drv_opts->name, screen->scrn_device->dev_driver) == 0) {
                OptionInfoPtr opts = drv_opts->option;

-               while (opts->name) {
+               while (opts && opts->name) {
                    if (xf86nameCompare(opts->name, "Rotate") == 0) {
                        foundRotate = True;
                        break;

<Prev in Thread] Current Thread [Next in Thread>