From owner-freebsd-current@FreeBSD.ORG Sat Jul 28 22:35:41 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44E81106566B for ; Sat, 28 Jul 2012 22:35:41 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id C77B98FC12 for ; Sat, 28 Jul 2012 22:35:40 +0000 (UTC) Received: by wibhr14 with SMTP id hr14so544482wib.13 for ; Sat, 28 Jul 2012 15:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=CZhLO0wNsk/raVzXxqpIX+eR3GFDMxj1456SWdF50Oc=; b=gYBzPf6hy389o2TbPplG0nlDg6XUAg3xpMn8ozY6DTG8l5Wr+CUeZ4P+O6efnEJfBA LZ+w1GDgQGHF2wjGY+1p1Q2zNV26O4b81VnyXj8TcZMRah0SXOJtWpRaZC/4Wvmz3H3G LWv8QogEPzOisuYdPbycxHaRLma7db4GGOi9upzA394YTbfCgySypSzANcAkco+vdGbq Me+XzQD79qLZ1tgs4BP8yXrLR7VJVu/kPRl3uAniSv/YC59zzrn4PUVyFUWHgeRmnhRG x232swhPJfRu4M3it/Mu3FzNTjgUmUdCc14iQ4K0K0DWSxLbW8eidw9xwKz0fnVXvSuf AWkg== MIME-Version: 1.0 Received: by 10.180.91.1 with SMTP id ca1mr31758163wib.8.1343514939702; Sat, 28 Jul 2012 15:35:39 -0700 (PDT) Received: by 10.216.199.31 with HTTP; Sat, 28 Jul 2012 15:35:39 -0700 (PDT) In-Reply-To: References: <20120725155211.GA33971@onelab2.iet.unipi.it> Date: Sat, 28 Jul 2012 18:35:39 -0400 Message-ID: From: Arnaud Lacombe To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 Cc: Luigi Rizzo , current@freebsd.org Subject: Re: RFC: libkern version of inet_ntoa_r X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2012 22:35:41 -0000 Hi, On Sat, Jul 28, 2012 at 6:14 PM, Bjoern A. Zeeb wrote: > On Wed, 25 Jul 2012, Luigi Rizzo wrote: > >> During some ipfw/dummynet cleanup i noticed that the libkern version of >> inet_ntoa_r() is missing the buffer size argument that is present in >> the libc counterpart. >> >> Any objection if i fix it ? > > > And why exactly would you need it? What does libc do with it? Render > partial IPv4 addresses? > Mitigate possibilities of memory corruption ? At the very least, allow the following: { char tmp[sizeof "255.255.255.255"]; KASSERT(size >= (sizeof tmp)); [...] } to be enforced... but hey, who gives a damn about consistently doing things and enforcing code assumptions ? ;-) - Arnaud > -- > Bjoern A. Zeeb You have to have visions! > Stop bit received. Insert coin for new address family. > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"