diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-04-21 16:14:40 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-21 21:55:56 +0300 |
commit | c8131dc32be24d4413e7ed534f53e8b0cc5d3c36 (patch) | |
tree | b3e49a6e6199e7c91803188512194ccdea901337 | |
parent | fdc088a7f4b0fe5204995b9c236e338c200cc44c (diff) | |
download | linux-c8131dc32be24d4413e7ed534f53e8b0cc5d3c36.tar.xz |
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>
-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); } |