projects
/
wrapfs-4.2.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
178379e
)
can: Use correct type in sizeof() in nla_put()
author
Marek Vasut
<marex@denx.de>
Fri, 30 Oct 2015 12:48:19 +0000
(13:48 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:18 +0000
(14:31 -0500)
commit
562b103a21974c2f9cd67514d110f918bb3e1796
upstream.
The sizeof() is invoked on an incorrect variable, likely due to some
copy-paste error, and this might result in memory corruption. Fix this.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/dev.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/dev.c
b/drivers/net/can/dev.c
index aede704605c66973c6bc3697a91c90f743990a01..141c2a42d7edad6f9e833d7ab56068d7e2dd71bb 100644
(file)
--- a/
drivers/net/can/dev.c
+++ b/
drivers/net/can/dev.c
@@
-915,7
+915,7
@@
static int can_fill_info(struct sk_buff *skb, const struct net_device *dev)
nla_put(skb, IFLA_CAN_BITTIMING_CONST,
sizeof(*priv->bittiming_const), priv->bittiming_const)) ||
- nla_put(skb, IFLA_CAN_CLOCK, sizeof(
cm
), &priv->clock) ||
+ nla_put(skb, IFLA_CAN_CLOCK, sizeof(
priv->clock
), &priv->clock) ||
nla_put_u32(skb, IFLA_CAN_STATE, state) ||
nla_put(skb, IFLA_CAN_CTRLMODE, sizeof(cm), &cm) ||
nla_put_u32(skb, IFLA_CAN_RESTART_MS, priv->restart_ms) ||