diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-11-08 01:24:19 -0800 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2013-11-17 19:42:18 +0100 |
commit | ab5bbdc7015bb35c364ad5f3c955736b17d1acb6 (patch) | |
tree | 2a224d7e8fab995a5f8f39f353d1ca13abdc32cc /drivers/watchdog | |
parent | 0859ffc3b3cb673ac1d3f33b0265cf60d1e3836d (diff) | |
download | op-kernel-dev-ab5bbdc7015bb35c364ad5f3c955736b17d1acb6.zip op-kernel-dev-ab5bbdc7015bb35c364ad5f3c955736b17d1acb6.tar.gz |
watchdog: pcwd_usb: overflow in usb_pcwd_send_command()
We changed "buf" from being an array of 6 chars to being a pointer this
sizeof(buf) needs to be updated as well.
Fixes: 2ddb8089a7e5 ('watchdog: pcwd_usb: Use allocated buffer for usb_control_msg')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/pcwd_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c index 53598e8..b731b5d 100644 --- a/drivers/watchdog/pcwd_usb.c +++ b/drivers/watchdog/pcwd_usb.c @@ -258,8 +258,8 @@ static int usb_pcwd_send_command(struct usb_pcwd_private *usb_pcwd, if (usb_control_msg(usb_pcwd->udev, usb_sndctrlpipe(usb_pcwd->udev, 0), HID_REQ_SET_REPORT, HID_DT_REPORT, - 0x0200, usb_pcwd->interface_number, buf, sizeof(buf), - USB_COMMAND_TIMEOUT) != sizeof(buf)) { + 0x0200, usb_pcwd->interface_number, buf, 6, + USB_COMMAND_TIMEOUT) != 6) { dbg("usb_pcwd_send_command: error in usb_control_msg for " "cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb); } |