delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/10/05/19:53:37

X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs-
Date: Mon, 5 Oct 1998 15:52:05 -0400 (EDT)
From: Gregory A Lundberg <lundberg AT vr DOT net>
To: Bernhard Rosenkraenzer <bero AT microsoft DOT sucks DOT eu DOT org>
cc: egcs-bugs AT cygnus DOT com, pgcc-list AT Desk DOT nl, bug-gcc AT prep DOT ai DOT mit DOT edu
Subject: Re: Bug in gcc 2.7.2.3, 2.8.1, egcs and pgcc
In-Reply-To: <Pine.Bero.4.05.9810052055110.21568-300000@k6.bero>
Message-ID: <Pine.LNX.4.03.9810051549270.27503-100000@gaia.vr.net>
MIME-Version: 1.0
Sender: Marc Lehmann <pcg AT goof DOT com>
Lines: 48

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019