Date: Tue, 6 Jul 2004 01:18:56 +0800 (CST) From: Leland Wang <llwang@infor.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/68705: x11-wm/skippy fails to read configuration file and crashes Message-ID: <20040705171856.C7B7A92C1@infor.ck.tp.edu.tw> Resent-Message-ID: <200407051720.i65HKFfS027943@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040705171856.C7B7A92C1>