From owner-freebsd-bugs Tue Oct 2 8:48: 2 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 5442D37B403 for ; Tue, 2 Oct 2001 08:48:00 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id f92FlnX69538; Tue, 2 Oct 2001 11:47:49 -0400 (EDT) (envelope-from wollman) Date: Tue, 2 Oct 2001 11:47:49 -0400 (EDT) From: Garrett Wollman Message-Id: <200110021547.f92FlnX69538@khavrinen.lcs.mit.edu> To: Peter Pentchev Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/30968: whois client bug w/ .biz In-Reply-To: <200110021120.f92BK2L92453@freefall.freebsd.org> References: <200110021120.f92BK2L92453@freefall.freebsd.org> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org < said: > while ((buf = fgetln(sfi, &len)) != NULL) { > + newbuf = realloc(buf, len + 1); You can't do this. The buffer fgetln() returns belongs to stdio (it may be a pointer into the FILE's buffer). -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message