From owner-freebsd-bugs Sat Jan 12 21:20: 5 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3E0C837B417 for ; Sat, 12 Jan 2002 21:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0D5K2b90544; Sat, 12 Jan 2002 21:20:02 -0800 (PST) (envelope-from gnats) Date: Sat, 12 Jan 2002 21:20:02 -0800 (PST) Message-Id: <200201130520.g0D5K2b90544@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Matthew Emmerton" Subject: Re: bin/5297: make incompatibility with System V style variable substitions Reply-To: "Matthew Emmerton" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/5297; it has been noted by GNATS. From: "Matthew Emmerton" To: , Cc: Subject: Re: bin/5297: make incompatibility with System V style variable substitions Date: Sun, 13 Jan 2002 00:19:39 -0500 The real problem is that Str_SYSVMatch doesn't check for an empty word, which obviously won't match anything. --- str.c Sat Sep 11 09:08:01 1999 +++ str.c.matt Sun Jan 13 00:01:22 2002 @@ -421,6 +421,12 @@ char *w = word; char *m; + if (*w == '\0') { + /* Null word can't be matched against */ + *len = 0; + return NULL; + } + if (*p == '\0') { /* Null pattern is the whole string */ *len = strlen(w); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message