Mail Archives: pgcc/1998/10/05/19:53:37
On Mon, 5 Oct 1998, Bernhard Rosenkraenzer wrote:
> Date: Mon, 5 Oct 1998 21:28:16 +0200 (CEST)
> From: Bernhard Rosenkraenzer <bero AT microsoft DOT sucks DOT eu DOT org>
> To: egcs-bugs AT cygnus DOT com,
pgcc-list AT desk DOT nl,
bug-gcc AT prep DOT ai DOT mit DOT edu
> Cc: lundberg AT vr DOT net
> Subject: Bug in gcc 2.7.2.3, 2.8.1, egcs and pgcc
>
> I believe I have found a bug present in all gcc 2.7.2.3, gcc 2.8.1, egcs 1.1,
> pgcc 1.1, egcs and pgcc 19980921 - gcc seems to assume a result of an if
> command is false a bit too early.
>
> The sample file is taken from BeroFTPD 1.1.12 (old) and 1.1.13 (new).
>
> While both procedures do exactly the same, the old one fails, the new one
> works (by splitting an if in two parts, using a variable).
> The problem with the old one is that, for example, if "noretrieve core" is
> specified in ftpaccess [-> entry->arg[0] == "core"], and a user tries to
> get a core file somewhere [-> lbasename(realname) == "core" ], he is
> permitted to do so (return 0 rather than reply... return 1).
>
> This happens on an ix86 running Linux; it's not an optimization bug (happens
> with -O0 as only option, as well).
>
> LLaP
> bero
>
>
In the 'original' code we see:
*(entry->arg[i]) = '/'
as the first clause of the if statement. This should read
*(entry->arg[i]) == '/'
Fix that and re-test. It's the = vs == typo I was referring to in VR8.5
patch to wu-ftpd.
--
Gregory A Lundberg Senior Partner, VRnet Company
1441 Elmdale Drive lundberg AT vr DOT net
Kettering, OH 45409-1615 USA 1-800-809-2195
- Raw text -