Commit b12a0c31 authored by David S. Miller's avatar David S. Miller

Merge tag 'linux-can-fixes-for-3.14-20140212' of git://gitorious.org/linux-can/linux-can

linux-can-fixes-for-3.14-20140212

Marc Kleine-Budde says:

====================
this is a pull request with one patch for net/master, for the current release
cycle. Olivier Sobrie noticed and fixed that the kvaser_usb driver doesn't
check the number of channels value from the hardware, which may result in
writing over the bounds of an array in the driver.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 91ff37ff 862474f8
...@@ -473,6 +473,8 @@ static int kvaser_usb_get_card_info(struct kvaser_usb *dev) ...@@ -473,6 +473,8 @@ static int kvaser_usb_get_card_info(struct kvaser_usb *dev)
return err; return err;
dev->nchannels = msg.u.cardinfo.nchannels; dev->nchannels = msg.u.cardinfo.nchannels;
if (dev->nchannels > MAX_NET_DEVICES)
return -EINVAL;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment