From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 24 11:44:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A41116A4CE for ; Sat, 24 Apr 2004 11:44:25 -0700 (PDT) Received: from pc5.i.0x5.de (n.0x5.de [213.146.113.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA52643D1D for ; Sat, 24 Apr 2004 11:44:23 -0700 (PDT) (envelope-from nicolas@pc5.i.0x5.de) Received: from pc5.i.0x5.de (nicolas@localhost [127.0.0.1]) by pc5.i.0x5.de (8.12.9p2/8.12.9) with ESMTP id i3OIiICh026076; Sat, 24 Apr 2004 20:44:18 +0200 (CEST) (envelope-from nicolas@pc5.i.0x5.de) Received: (from nicolas@localhost) by pc5.i.0x5.de (8.12.9p2/8.12.9/Submit) id i3OIiIY9026075; Sat, 24 Apr 2004 20:44:18 +0200 (CEST) (envelope-from nicolas) Date: Sat, 24 Apr 2004 20:44:18 +0200 From: Nicolas Rachinsky To: Anton Alin-Adrian Message-ID: <20040424184418.GA25917@pc5.i.0x5.de> Mail-Followup-To: Anton Alin-Adrian , freebsd-hackers@freebsd.org References: <408AB18B.9020906@reversedhell.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <408AB18B.9020906@reversedhell.net> X-Powered-by: FreeBSD X-Homepage: http://www.rachinsky.de X-PGP-Keyid: C11ABC0E X-PGP-Fingerprint: 19DB 8392 8FE0 814A 7362 EEBD A53B 526A C11A BC0E X-PGP-Key: http://www.rachinsky.de/nicolas/nicolas_rachinsky.asc User-Agent: Mutt/1.5.6i cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD's malloc problem ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2004 18:44:25 -0000 * Anton Alin-Adrian [2004-04-24 21:27 +0300]: > tmp = (char *) malloc(strlen(s)); // line 68 Hmm, you need strlen(s)+1 bytes to store the string -- don't forget the trailing null byte. Nicolas