From owner-freebsd-current Mon Oct 9 23:47:33 1995 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id XAA15191 for current-outgoing; Mon, 9 Oct 1995 23:47:33 -0700 Received: from vinkku.hut.fi (root@vinkku.hut.fi [130.233.245.1]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id XAA15173 for ; Mon, 9 Oct 1995 23:47:27 -0700 Received: from lk-hp-4.hut.fi (lk-hp-4.hut.fi [130.233.244.35]) by vinkku.hut.fi (8.6.12/8.6.7) with ESMTP id IAA05912 for ; Tue, 10 Oct 1995 08:47:22 +0200 Received: (vode@localhost) by lk-hp-4.hut.fi (8.6.12/8.6.7) id IAA13033; Tue, 10 Oct 1995 08:47:22 +0200 Date: Tue, 10 Oct 1995 08:47:22 +0200 Message-Id: <199510100647.IAA13033@lk-hp-4.hut.fi> From: Kai Vorma To: current@freebsd.org Subject: tail dumps core Reply-to: Kai.Vorma@hut.fi Sender: owner-current@freebsd.org Precedence: bulk "cat file | tail" dumps core with the newest phk-malloc. This patch should help. *** read.c Fri May 27 15:32:45 1994 --- read.c.ok Tue Oct 10 08:30:35 1995 *************** *** 142,148 **** if ((lines = malloc(off * sizeof(*lines))) == NULL) err(1, "%s", strerror(errno)); ! sp = NULL; blen = cnt = recno = wrap = 0; --- 142,148 ---- if ((lines = malloc(off * sizeof(*lines))) == NULL) err(1, "%s", strerror(errno)); ! bzero(lines, off * sizeof(*lines)); sp = NULL; blen = cnt = recno = wrap = 0; ..vode