Date: Wed, 16 Oct 1996 17:56:40 -0700 From: David Greenman <dg@root.com> To: Peter Wemm <peter@freefall.freebsd.org> Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-lib@freefall.freebsd.org Subject: Re: cvs commit: src/lib/libc/gen getcwd.c Message-ID: <199610170056.RAA10128@root.com> In-Reply-To: Your message of "Wed, 16 Oct 1996 17:40:07 PDT." <199610170040.RAA18918@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>peter 96/10/16 17:40:06
>
> Modified: lib/libc/gen getcwd.c
> Log:
> Corrently null-terminate the path being passed to the opendir() calls,
> malloc() does is not defined to return a zeroed buffer leading to
> "strange" problems.
>
> Submitted by: Karl Denninger <karl@mcs.com>, PR#1826
I think the assignment at the bottom of the loop:
/* Truncate any file name. */
*bup = '\0';
}
...is now redundant since *bup isn't modified again. So the real fix was
probably to simply move the above assignment up a couple dozen lines.
-DG
David Greenman
Core-team/Principal Architect, The FreeBSD Project
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610170056.RAA10128>
