delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/07/05:10:18

Date: Sun, 7 Jan 2001 12:08:27 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: Bug in lstat() - wrong arguments to FSEXT
In-Reply-To: <3A571D5F.36413161@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1010107120611.21289S-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 6 Jan 2001, Richard Dawe wrote:

> There appears to be a bug in lstat() - see line 910 of
> src/libc/posix/sys/stat/lstat.c:
> 
>    if (__FSEXT_call_open_handlers(__FSEXT_stat, &ret, &real_path))
>      return ret;
> 
> __FSEXT_call_open_handlers() should be called with the third arg as a
> va_list, not a pointer like this.

I think this is a result of replacing `path' with `real_path' when 
symlink support was added to `stat': the former was on the stack, since 
it's the argument of `stat' (now `lstat'), and so passing a pointer to 
it does TRT, evebn though it is not declared as a va_list.

- Raw text -


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