Commit b2bcc6d2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Felix Fietkau
Browse files

mt76: mt7915: fix a precision vs width bug in printk



Precision %.*s was intended instead of width %*s.  The original code
will still print unintended data from beyond the end of skb->data.

Fixes: 665b2c78 ("mt76: mt7915: limit firmware log message printk to buffer length")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent c8131dc3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -521,7 +521,7 @@ mt7915_mcu_rx_log_message(struct mt7915_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);
}