ports/96783: Crash in gtk2-theme-switch

markzero markzero at corolla.ath.cx
Thu May 4 17:10:15 UTC 2006


>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 at 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:



More information about the freebsd-ports-bugs mailing list