From owner-freebsd-net Thu Oct 4 2:30:54 2001 Delivered-To: freebsd-net@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 9B00C37B401; Thu, 4 Oct 2001 02:30:48 -0700 (PDT) Received: (from ache@localhost) by nagual.pp.ru (8.11.6/8.11.6) id f949UiG65117; Thu, 4 Oct 2001 13:30:44 +0400 (MSD) (envelope-from ache) Date: Thu, 4 Oct 2001 13:30:42 +0400 From: "Andrey A. Chernov" To: Peter Pentchev Cc: freebsd-net@FreeBSD.ORG, freebsd-audit@FreeBSD.ORG Subject: Re: [CFR] whois(1) out-of-bound access patch Message-ID: <20011004133041.B64960@nagual.pp.ru> References: <20011004121640.C1959@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011004121640.C1959@ringworld.oblivion.bg> User-Agent: Mutt/1.3.21i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Oct 04, 2001 at 12:16:40 +0300, Peter Pentchev wrote: > + abuf = calloc(1, len + 1); > + if (abuf == NULL) { > + errno = ENOMEM; > + err(1, "reallocating"); > + } To overwrite errno set by calloc() is wrong. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message