From owner-cvs-lib Wed Oct 16 17:55:30 1996 Return-Path: owner-cvs-lib Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA19599 for cvs-lib-outgoing; Wed, 16 Oct 1996 17:55:30 -0700 (PDT) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id RAA19594; Wed, 16 Oct 1996 17:55:27 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by root.com (8.7.6/8.6.5) with SMTP id RAA10128; Wed, 16 Oct 1996 17:56:40 -0700 (PDT) Message-Id: <199610170056.RAA10128@root.com> X-Authentication-Warning: implode.root.com: Host localhost [127.0.0.1] didn't use HELO protocol To: Peter Wemm 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 In-reply-to: Your message of "Wed, 16 Oct 1996 17:40:07 PDT." <199610170040.RAA18918@freefall.freebsd.org> From: David Greenman Reply-To: dg@root.com Date: Wed, 16 Oct 1996 17:56:40 -0700 Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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 , 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