linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch -next] iwlwifi: use a format string for an snprintf()
@ 2014-12-04 11:02 Dan Carpenter
  2014-12-28 18:57 ` Grumbach, Emmanuel
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-12-04 11:02 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Emmanuel Grumbach, Intel Linux Wireless, John W. Linville,
	linux-wireless, kernel-janitors

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@oracle.com>

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-28 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 11:02 [patch -next] iwlwifi: use a format string for an snprintf() Dan Carpenter
2014-12-28 18:57 ` Grumbach, Emmanuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).