Date: Sat, 12 Jan 2002 21:20:02 -0800 (PST) From: "Matthew Emmerton" <matt@gsicomp.on.ca> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/5297: make incompatibility with System V style variable substitions Message-ID: <200201130520.g0D5K2b90544@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/5297; it has been noted by GNATS. From: "Matthew Emmerton" <matt@gsicomp.on.ca> To: <freebsd-gnats-submit@FreeBSD.org>, <mark@thuvia.demon.co.uk> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201130520.g0D5K2b90544>