diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-04-21 15:14:40 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-21 20:55:56 +0200 |
commit | c8131dc32be24d4413e7ed534f53e8b0cc5d3c36 (patch) | |
tree | b3e49a6e6199e7c91803188512194ccdea901337 /drivers/net/wireless | |
parent | mt76: debugfs: introduce napi_threaded node (diff) | |
download | linux-c8131dc32be24d4413e7ed534f53e8b0cc5d3c36.tar.xz linux-c8131dc32be24d4413e7ed534f53e8b0cc5d3c36.zip |
mt76: mt7615: fix a precision vs width bug in printk
Precision "%.*s" was intended instead of width "%*s". The original code
will print garbage from beyond the end of the skb->data.
Fixes: d76d6c3ba2b0 ("mt76: mt7615: limit firmware log message printk to buffer length")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index 3c1528ed2110..aa42af9ebfd6 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -453,7 +453,7 @@ mt7615_mcu_rx_log_message(struct mt7615_dev *dev, struct sk_buff *skb) break; } - wiphy_info(mt76_hw(dev)->wiphy, "%s: %*s", type, + wiphy_info(mt76_hw(dev)->wiphy, "%s: %.*s", type, (int)(skb->len - sizeof(*rxd)), data); } |