Search Linux Wireless

Re: [patch -next] iwlwifi: use a format string for an snprintf()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2014-12-04 at 14:02 +0300, Dan Carpenter wrote:
> This will make Kees Cook happy if we specify a format string and, who
> knows, maybe someday there will be a firmware version with a percent
> character and we'll be glad for this.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 

The patch that introduces this code has been reverted in -next, so this
doesn't apply there.

Thank you.

> diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
> index 38de151..68efe97 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-drv.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
> @@ -1296,7 +1296,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
>  		iwl_dealloc_ucode(drv);
>  
>  		/* Build name of correct-step FW */
> -		snprintf(firmware_name, sizeof(firmware_name),
> +		snprintf(firmware_name, sizeof(firmware_name), "%s",
>  			 strrchr(drv->firmware_name, '-'));
>  		snprintf(drv->firmware_name, sizeof(drv->firmware_name),
>  			 "%s%s", drv->cfg->fw_name_pre, firmware_name);

��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux