From owner-svn-src-all@freebsd.org Thu Jul 30 22:14:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 685BF9AF637; Thu, 30 Jul 2015 22:14:33 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 58831168C; Thu, 30 Jul 2015 22:14:33 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from AlfredMacbookAir.local (static-108-44-39-3.albyny.fios.verizon.net [108.44.39.3]) by elvis.mu.org (Postfix) with ESMTPSA id 99A78341F947; Thu, 30 Jul 2015 15:14:32 -0700 (PDT) Subject: Re: svn commit: r285950 - stable/10/usr.sbin/mfiutil To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org References: <201507281240.t6SCegFp098520@repo.freebsd.org> From: Alfred Perlstein Organization: FreeBSD Message-ID: <55BAA1C8.7070004@freebsd.org> Date: Thu, 30 Jul 2015 18:14:32 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <201507281240.t6SCegFp098520@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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, 30 Jul 2015 22:14:33 -0000 Can't this use asprintf? There's a catchall free() at the end and no early returns in this function. Otherwise snprintf? On 7/28/15 8:40 AM, Ed Maste wrote: > Author: emaste > Date: Tue Jul 28 12:40:41 2015 > New Revision: 285950 > URL: https://svnweb.freebsd.org/changeset/base/285950 > > Log: > MFC r201289: mfiutil: increase buffer size to accommodate sprintf string > > PR: 201289 > > Modified: > stable/10/usr.sbin/mfiutil/mfi_foreign.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/usr.sbin/mfiutil/mfi_foreign.c > ============================================================================== > --- stable/10/usr.sbin/mfiutil/mfi_foreign.c Tue Jul 28 12:40:09 2015 (r285949) > +++ stable/10/usr.sbin/mfiutil/mfi_foreign.c Tue Jul 28 12:40:41 2015 (r285950) > @@ -110,7 +110,7 @@ static int > foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) > { > struct mfi_config_data *config; > - char prefix[26]; > + char prefix[64]; > int error; > uint8_t mbox[4]; > >