From owner-freebsd-current Sat Oct 14 12:56:06 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA16473 for current-outgoing; Sat, 14 Oct 1995 12:56:06 -0700 Received: from irbs.irbs.com (irbs.com [199.182.75.129]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA16468 for ; Sat, 14 Oct 1995 12:55:56 -0700 Received: (from jc@localhost) by irbs.irbs.com (8.6.12/8.6.6) id PAA12591 for freebsd-current@freefall.cdrom.com; Sat, 14 Oct 1995 15:55:08 -0400 From: John Capo Message-Id: <199510141955.PAA12591@irbs.irbs.com> Subject: phkmalloc and X programs To: freebsd-current@freefall.FreeBSD.org (freebsd-current) Date: Sat, 14 Oct 1995 15:55:07 -0400 (EDT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 503 Sender: owner-current@FreeBSD.org Precedence: bulk Here is another broken X program. Notice the assumption that malloc() returns zeroed memory. xhost.c: namelen = strlen(name); if ((lname = (char *)malloc(namelen)) == NULL) { fprintf (stderr, "%s: malloc bombed in change_host\n", ProgramName); exit (1); } for (i = 0; i < namelen; i++) { lname[i] = tolower(name[i]); } if (!strncmp("inet:", lname, 5)) { ... ... John Capo IRBS Engineering High performance FreeBSD systems