Subject: port-amiga/11685: grfconfig checks only that first line in mode definion file is valid
To: None <gnats-bugs@gnats.netbsd.org>
From: None <petri.koistinen@iki.fi>
List: netbsd-bugs
Date: 12/10/2000 15:57:15
>Number:         11685
>Category:       port-amiga
>Synopsis:       grfconfig checks only that first line in mode definition file is valid
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amiga-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 10 15:57:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Petri Koistinen
>Release:        1.5BETA2.5
>Organization:
>Environment:
System: NetBSD kissakala 1.5_BETA2 NetBSD 1.5_BETA2 (INSTWDCPCM) #13:
Wed Nov 15 04:42:09 MET 2000 is@jocelyn:/var/obj/kernel/INSTWDCPCM amiga

>Description:
grfconfig does only error checking on first line of mode definition file.

>How-To-Repeat:
bash-2.03$ cat foobar.conf
1 24499996 640 400 8 640 680 744 736 399 400 403
2 24499996 640 400 8 640 680 744 736 399 400 403 420 default

bash-2.03$ cat barfoo.conf
1 24499996 640 400 8 640 680 744 736 399 400 403 420 default
2 24499996 640 400 8 640 680 744 736 399 400 403

bash-2.03$ grfconfig /dev/grf3 foobar.conf
grfconfig: too few values in mode definition file:
 1 24499996 640 400 8 640 680 744 736 399 400 403

bash-2.03$ grfconfig /dev/grf3 barfoo.conf
Segmentation fault (core dumped)

bash-2.03$ gdb -core grfconfig.core `which grfconfig`
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "m68k--netbsd"...(no debugging symbols found)...
Core was generated by `grfconfig'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...(no debugging symbols
found)...done
.
Reading symbols from /usr/lib/libc.so.12.62.1...(no debugging symbols
found).
..
done.
#0  0x806f97c in strtol ()
(gdb) where
#0  0x806f97c in strtol ()
#1  0x806f118 in atoi ()
#2  0x2f52 in main ()
#3  0x20e0 in __start ()
(gdb) quit

	
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: