From 2bf301bc81df81907ceabbfd7bf57743696899bb Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 21 Apr 2021 16:16:06 +0300 Subject: [PATCH] mt76: mt7921: fix a precision vs width bug in printk Precision %.*s was intended instead of width %*s. The original code is potentially an information leak. Fixes: c7cc5ec57303 ("mt76: mt7921: rework mt7921_mcu_debug_msg_event routine") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c index 43e3bf8..78bd965 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c @@ -502,7 +502,7 @@ mt7921_mcu_debug_msg_event(struct mt7921_dev *dev, struct sk_buff *skb) if (!msg->content[i]) msg->content[i] = ' '; } - wiphy_info(mt76_hw(dev)->wiphy, "%*s", len, msg->content); + wiphy_info(mt76_hw(dev)->wiphy, "%.*s", len, msg->content); } } -- 2.7.4