diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-02-21 16:30:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-22 15:31:54 -0500 |
commit | 22ad7499bc9297e47c8779bf5523694f28338499 (patch) | |
tree | 237ee1cd079700e3313e9ee78644deea150f0134 /drivers/net/usb | |
parent | 5d38b1f8cf8798d4df7809b3f3e38fad4d923e85 (diff) |
hso: memsetting wrong data in hso_get_count()
The intent was to clear out the icount struct here, but we accidentally
clear stack memory instead. It probably will lead to a NULL dereference
right away.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/hso.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 304fe78ff60e..e1324b4a0f66 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -1632,7 +1632,7 @@ static int hso_get_count(struct tty_struct *tty, | |||
1632 | struct hso_serial *serial = get_serial_by_tty(tty); | 1632 | struct hso_serial *serial = get_serial_by_tty(tty); |
1633 | struct hso_tiocmget *tiocmget = serial->tiocmget; | 1633 | struct hso_tiocmget *tiocmget = serial->tiocmget; |
1634 | 1634 | ||
1635 | memset(&icount, 0, sizeof(struct serial_icounter_struct)); | 1635 | memset(icount, 0, sizeof(struct serial_icounter_struct)); |
1636 | 1636 | ||
1637 | if (!tiocmget) | 1637 | if (!tiocmget) |
1638 | return -ENOENT; | 1638 | return -ENOENT; |