Date: Mon, 29 Nov 2004 21:12:35 +0300 From: "kostik <kostik@ncport.ru>" <kostik@ncport.ru> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Cc: kostik@ncport.ru Subject: ports/74522: gnomeicu crashes on incorrect history file. Message-ID: <1101751955.0@fuzzy.ncport.ru> Resent-Message-ID: <200411291820.iATIKXvi081705@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1101751955.0>