>Synopsis: Crash in gtk2-theme-switch
>Arrival-Date: Thu May 04 17:10:13 GMT 2006
>Release: FreeBSD 6.0-RELEASE-p4 i386
System: FreeBSD logik.internal.network 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #1: Sun Mar 12 18:36:03 GMT 2006 email@example.com:/usr/src/sys/i386/compile/LOGIK007 i386
gtk2-theme-switch does not check the return value of the fopen()
call in ok_clicked(), line 210 inside switch.c. For some reason,
I had some strange permissions on the ~/gtkrc-2.0 file that it
attempted to open and write to. The call failed and an invalid
pointer was passed to fprintf, causing a crash.
$ chmod 000 ~/.gtkrc-2.0
A simple fix would be to check the return value of the fopen()
call and display some sort of error. I don't know the gtk toolkit
well enough to do this though.
There are a quite a few unchecked fopen() calls in this program.