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 <[email protected]>

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);
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to