ports/74522: gnomeicu crashes on incorrect history file.
kostik <kostik@ncport.ru>
kostik at ncport.ru
Mon Nov 29 18:20:35 UTC 2004
>Number: 74522
>Category: ports
>Synopsis: gnomeicu crashes on incorrect history file.
>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: Mon Nov 29 18:20:33 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: kostik <kostik at ncport.ru>
>Release: FreeBSD 5.2-CURRENT i386
>Organization:
Newcom Port ISP
>Environment:
System: FreeBSD 5.2-CURRENT #0: Tue Aug 10 17:37:41 MSD 2004
kostik at fuzzy.ncport.ru:/usr/obj/usr/src/sys/FUZZY
>Description:
When you try to open incorrectly formatted history file (left from much-much older version of gnomeicu, for example) the result was a core dump in src/history.c:history_parse_chunk():sscanf().
>How-To-Repeat:
Run gnomeicu ver. 0.99.5 and try open history with an incorrectly formatted user history file.
>Fix:
Apply the following patch, recompile and run:
=======================================
--- src/history.c.orig Mon Nov 29 20:48:25 2004
+++ src/history.c Mon Nov 29 20:21:37 2004
@@ -214,6 +214,11 @@
char direction;
time_t time;
+ if (! (ptr+4)) {
+ g_free (hp->buffer);
+ g_free (hp);
+ return FALSE;
+ }
/* read header info */
sscanf (ptr+4, "%c %d", &direction, (int *)&time);
=======================================
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list