Skip to contentSkip to conversation

rtlwifi: btcoexist: avoid format string in printk

PATCH Superseded Kees Cook 1 participant 1 message Jun 10, 2014

Subsystems (3)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 rtlwifi: btcoexist: avoid format string in printk

Since CL_PRINTF only ever takes a single argument, make sure a format string cannot leak into printk.

---
 .../net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h  |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.h +1 -1
index 871fc3c6d559..049f4c8d98a8 100644
@@ -114,7 +114,7 @@ extern u32 btc_dbg_type[];
 
 
 #define	CL_SPRINTF	snprintf
-#define	CL_PRINTF	printk
+#define	CL_PRINTF(buf)	printk("%s", buf)
 
 #define	BTC_PRINT(dbgtype, dbgflag, printstr, ...)		\
 	do {							\
Signature · 6 lines
1.7.9.5


-- 
Kees Cook
Chrome OS Security