From owner-freebsd-current Sat Oct 14 20:06:58 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA27803 for current-outgoing; Sat, 14 Oct 1995 20:06:58 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id UAA27798 for ; Sat, 14 Oct 1995 20:06:51 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id NAA01708; Sun, 15 Oct 1995 13:02:13 +1000 Date: Sun, 15 Oct 1995 13:02:13 +1000 From: Bruce Evans Message-Id: <199510150302.NAA01708@godzilla.zeta.org.au> To: jc@irbs.com, terry@lambert.org Subject: Re: phkmalloc and X programs Cc: freebsd-current@freefall.freebsd.org Sender: owner-current@FreeBSD.org Precedence: bulk >> lname is not NULL terminated unless malloc() returns zeroed memory. >Not even then, unless the memory is uniformly overallocated, and the >overallocated portion is zeroed as well as the requested portion. >Looks like the malloc(namelen) should be a calloc(namelen + 1). Is it already time for more lessons on the uselessness of calloc() :-). Bruce