From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jul 5 17:20:15 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6359D16A4CE for ; Mon, 5 Jul 2004 17:20:15 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4478043D4C for ; Mon, 5 Jul 2004 17:20:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i65HKFn3027946 for ; Mon, 5 Jul 2004 17:20:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i65HKFfS027943; Mon, 5 Jul 2004 17:20:15 GMT (envelope-from gnats) Resent-Date: Mon, 5 Jul 2004 17:20:15 GMT Resent-Message-Id: <200407051720.i65HKFfS027943@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Leland Wang Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB8A816A4CE for ; Mon, 5 Jul 2004 17:18:58 +0000 (GMT) Received: from infor.ck.tp.edu.tw (infor.ck.tp.edu.tw [203.64.26.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83DF543D2D for ; Mon, 5 Jul 2004 17:18:58 +0000 (GMT) (envelope-from llwang@infor.ck.tp.edu.tw) Received: by infor.ck.tp.edu.tw (Postfix, from userid 1001) id C7B7A92C1; Tue, 6 Jul 2004 01:18:56 +0800 (CST) Message-Id: <20040705171856.C7B7A92C1@infor.ck.tp.edu.tw> Date: Tue, 6 Jul 2004 01:18:56 +0800 (CST) From: Leland Wang To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/68705: x11-wm/skippy fails to read configuration file and crashes X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Leland Wang List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 17:20:15 -0000 >Number: 68705 >Category: ports >Synopsis: x11-wm/skippy fails to read configuration file and crashes >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 05 17:20:14 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Leland Wang >Release: FreeBSD 4.9-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD ll-X31 5.2-CURRENT FreeBSD 5.2-CURRENT #21: Sun Jul 4 10:28:48 CST 2004 root@ll-X31:/usr/obj/usr/src/sys/X31 i386 >Description: If the sample configuration file is copied to ~/.skippyrc, when skippy runs, it complains that every non-comment line is invalid and crashes. The complaint results from two failed regcomp()'s, and the crash results from the unability to find the end of config string. >How-To-Repeat: cd /usr/ports/x11-wm/skippy make install cp /usr/local/share/skippy/skippyrc-default ~/.skippyrc skippy >Fix: diff -urN skippy.orig/files/patch-config.c skippy/files/patch-config.c --- skippy.orig/files/patch-config.c Thu Jan 1 08:00:00 1970 +++ skippy/files/patch-config.c Mon Jul 5 23:33:45 2004 @@ -0,0 +1,22 @@ +--- config.c.orig Mon Jul 5 22:36:39 2004 ++++ config.c Mon Jul 5 23:32:25 2004 +@@ -72,9 +72,9 @@ + int ix = 0, l_ix = 0; + dlist *new_config = 0; + +- regcomp(&re_section, "^[[:space:]]*\\[[[:space:]]*([[:alnum:]]*?)[[:space:]]*\\][[:space:]]*$", REG_EXTENDED); ++ regcomp(&re_section, "^[[:space:]]*\\[[[:space:]]*([[:alnum:]]*)[[:space:]]*\\][[:space:]]*$", REG_EXTENDED); + regcomp(&re_empty, "^[[:space:]]*#|^[[:space:]]*$", REG_EXTENDED); +- regcomp(&re_entry, "^[[:space:]]*([[:alnum:]]+)[[:space:]]*=[[:space:]]*(.*?)[[:space:]]*$", REG_EXTENDED); ++ regcomp(&re_entry, "^[[:space:]]*([[:alnum:]]+)[[:space:]]*=[[:space:]]*(.*)[[:space:]]*$", REG_EXTENDED); + + while(1) + { +@@ -148,6 +148,7 @@ + fclose(fin); + return 0; + } ++ data[flen] = '\0'; + + fclose(fin); + >Release-Note: >Audit-Trail: >Unformatted: