Date: Thu, 30 Jul 2015 18:14:32 -0400 From: Alfred Perlstein <alfred@freebsd.org> To: Ed Maste <emaste@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r285950 - stable/10/usr.sbin/mfiutil Message-ID: <55BAA1C8.7070004@freebsd.org> In-Reply-To: <201507281240.t6SCegFp098520@repo.freebsd.org> References: <201507281240.t6SCegFp098520@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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]; > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55BAA1C8.7070004>