From owner-svn-src-all@FreeBSD.ORG Thu Mar 12 21:02:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0B61A7D; Thu, 12 Mar 2015 21:02:09 +0000 (UTC) Received: from mail-oi0-x22f.google.com (mail-oi0-x22f.google.com [IPv6:2607:f8b0:4003:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A11F5AE3; Thu, 12 Mar 2015 21:02:09 +0000 (UTC) Received: by oiba3 with SMTP id a3so7289876oib.1; Thu, 12 Mar 2015 14:02:08 -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=elkRJ+a5rqEQHMAOL3SmYENjy0MfrIM81tvogG2DQD8=; b=TLnPWQIAKFvmYVPXnfPD4E3x8tZxiFx+Ip5jHwNUX4h9yFEAKwGZyqoFUmSP3cVgWq HNqi7ETRxhRvJaZQxoCvlko3eYNZRSMjzsJ/L56C4zKkAeavwTWXgpK0/2zgk2QGJbOA aRaX6QX7JYNR1f4NKmCQouiFFILFbAVVydp6v9hw8NHd/JwThn/KTr3wlv+8JbAH/QSg A2A3dYTTWBX3y35tEen+btOj6Y8f3DbfArenC46s77ukIS/oGKLPMyQidcx9PGxhHISa Er2uChpJGydexnIk/UZojIdVt/YGZhgSgNoXAHBzlygRvD9Bio18xmjeQCK9l1BUVJvs zhNQ== MIME-Version: 1.0 X-Received: by 10.43.16.196 with SMTP id pz4mr52722361icb.69.1426194128845; Thu, 12 Mar 2015 14:02:08 -0700 (PDT) Received: by 10.107.156.75 with HTTP; Thu, 12 Mar 2015 14:02:08 -0700 (PDT) In-Reply-To: <201503121806.t2CI6VSU034853@svn.freebsd.org> References: <201503121806.t2CI6VSU034853@svn.freebsd.org> Date: Thu, 12 Mar 2015 17:02:08 -0400 Message-ID: Subject: Re: svn commit: r279932 - head/sys/vm From: Ryan Stone To: Ian Lepore Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 21:02:10 -0000 On Thu, Mar 12, 2015 at 2:06 PM, Ian Lepore wrote: > Nullterminate strings returned via sysctl. > > PR: 195668 > To quote the manpage: > The *sbuf* family of functions allows one to safely > allocate, construct and release bounded null-terminated > strings in kernel space. IMO the sbuf API is broken if we have to explicitly null-terminate the string ourselves.