svn commit: r285950 - stable/10/usr.sbin/mfiutil

Alfred Perlstein alfred at freebsd.org
Thu Jul 30 22:14:33 UTC 2015


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];
>   
>



More information about the svn-src-stable-10 mailing list