Date: Wed, 28 Nov 2001 18:05:02 +0900 From: =?ISO-2022-JP?B?IlMuS2FqaW5vLxskQjNhTG4/OBsoQiI=?= <kajino@nis.nec.co.jp> To: "Andrey A. Chernov" <ache@nagual.pp.ru> Cc: Koga Youichirou <y-koga@jp.FreeBSD.org>, mike@sentex.net, freebsd-security@FreeBSD.ORG Subject: Re: wu-ftpd ? Message-ID: <200111280905.fAS952G13031@SIS.ksp.nis.nec.co.jp> In-Reply-To: Your message of "Wed, 28 Nov 2001 11:44:17 JST." <20011128084416.GA32507@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Wed_Nov_28_18:05:02_2001-1 Content-Type: text/plain; charset=US-ASCII >>In Article <20011128084416.GA32507@nagual.pp.ru> > "Andrey A. Chernov" writes: >> Following is RedHat's patch: ; >It seems that this patch is over another patch and not for original 2.6.1 >sources. Could you please provide cumulative patch compared to original >sources? That's as follows. //////////////////////////////////////////////////////////////// NEC informatec systems Co.,ltd. TEL 044-812-8418 Shared Infrastructure and Service Div., 2nd SP Group. kajino@nis.nec.co.jp (S.Kajino) --Multipart_Wed_Nov_28_18:05:02_2001-1 Content-Type: text/plain; charset=US-ASCII diff -Naur wu-ftpd-2.6.1.orig/src/glob.c wu-ftpd-2.6.1/src/glob.c --- wu-ftpd-2.6.1.orig/src/glob.c Sun Jul 2 03:17:39 2000 +++ wu-ftpd-2.6.1/src/glob.c Wed Nov 28 14:10:55 2001 @@ -298,7 +298,7 @@ for (lm = restbuf; *p != '{'; *lm++ = *p++) continue; - for (pe = ++p; *pe; pe++) + for (pe = ++p; *pe; pe++) { switch (*pe) { case '{': @@ -314,11 +314,19 @@ case '[': for (pe++; *pe && *pe != ']'; pe++) continue; + if (!*pe) { + globerr = "Missing ]"; + return (0); + } continue; } + } pend: - brclev = 0; - for (pl = pm = p; pm <= pe; pm++) + if (brclev || !*pe) { + globerr = "Missing }"; + return (0); + } + for (pl = pm = p; pm <= pe; pm++) { switch (*pm & (QUOTE | TRIM)) { case '{': @@ -352,19 +360,18 @@ return (1); sort(); pl = pm + 1; - if (brclev) - return (0); continue; case '[': for (pm++; *pm && *pm != ']'; pm++) continue; - if (!*pm) - pm--; + if (!*pm) { + globerr = "Missing ]"; + return (0); + } continue; } - if (brclev) - goto doit; + } return (0); } @@ -416,11 +423,10 @@ else if (scc == (lc = cc)) ok++; } - if (cc == 0) - if (ok) - p--; - else - return 0; + if (cc == 0) { + globerr = "Missing ]"; + return (0); + } continue; case '*': @@ -472,67 +478,6 @@ } } } - -/* This function appears to be unused, so why waste time and space on it? */ -#if 0 == 1 -static int Gmatch(register char *s, register char *p) -{ - register int scc; - int ok, lc; - int c, cc; - - for (;;) { - scc = *s++ & TRIM; - switch (c = *p++) { - - case '[': - ok = 0; - lc = 077777; - while (cc = *p++) { - if (cc == ']') { - if (ok) - break; - return (0); - } - if (cc == '-') { - if (lc <= scc && scc <= *p++) - ok++; - } - else if (scc == (lc = cc)) - ok++; - } - if (cc == 0) - if (ok) - p--; - else - return 0; - continue; - - case '*': - if (!*p) - return (1); - for (s--; *s; s++) - if (Gmatch(s, p)) - return (1); - return (0); - - case 0: - return (scc == 0); - - default: - if ((c & TRIM) != scc) - return (0); - continue; - - case '?': - if (scc == 0) - return (0); - continue; - - } - } -} -#endif /* Gmatch exclusion */ static void Gcat(register char *s1, register char *s2) { --Multipart_Wed_Nov_28_18:05:02_2001-1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111280905.fAS952G13031>