ports/96783: Crash in gtk2-theme-switch

[ Available lists | Index of freebsd-ports-bugs | Month of May 2006 | Week of 4 May 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
markzero <markzero@corolla.ath.cx>
Date
4 May 2006 17:10:15
Subject
ports/96783: Crash in gtk2-theme-switch
Message-ID
20060504170353.8BC7F624B@logik.internal.network


[ Hide this part ]
 
>Number: 96783
>Category: ports
>Synopsis: Crash in gtk2-theme-switch
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 04 17:10:13 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: markzero
>Release: FreeBSD 6.0-RELEASE-p4 i386
>Organization:
n/a
>Environment:
System: FreeBSD logik.internal.network 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #1: Sun Mar 12 18:36:03 GMT 2006 root@logik.internal.network:/usr/src/sys/i386/compile/LOGIK007 i386

>Description:

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.

>How-To-Repeat:

$ chmod 000 ~/.gtkrc-2.0

$ gtk2-theme-switch

(click 'apply')

crash!

>Fix:

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.
Be warned!
>Release-Note:
>Audit-Trail:
>Unformatted:


Elapsed time: 0.072 seconds