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����z�ޗ�����n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux