Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
David S. Miller
22ad7499 5d38b1f8

+1 -1
+1 -1
drivers/net/usb/hso.c
··· 1632 1632 struct hso_serial *serial = get_serial_by_tty(tty); 1633 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 1637 if (!tiocmget) 1638 1638 return -ENOENT;