]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/usb/serial/mos7720.c
USB: serial/mos*: prevent reading uninitialized stack memory
[net-next-2.6.git] / drivers / usb / serial / mos7720.c
index 30922a7e3347494b5ca30b81ea77e53ea767e91e..aa665817a2720414a7e669b20499d62ebca4b6db 100644 (file)
@@ -2024,6 +2024,9 @@ static int mos7720_ioctl(struct tty_struct *tty, struct file *file,
 
        case TIOCGICOUNT:
                cnow = mos7720_port->icount;
+
+               memset(&icount, 0, sizeof(struct serial_icounter_struct));
+
                icount.cts = cnow.cts;
                icount.dsr = cnow.dsr;
                icount.rng = cnow.rng;