]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] USB: pl2303_update_line_status data length fix
authorHorst Schirmeier <horst@schirmeier.com>
Thu, 28 Jul 2005 13:32:20 +0000 (15:32 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 4 Jan 2006 21:51:41 +0000 (13:51 -0800)
Minimum data length must be UART_STATE + 1, as data[UART_STATE] is being
accessed for the new line_state. Although PL-2303 hardware is not
expected to send data with exactly UART_STATE length, this keeps it on
the safe side.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/pl2303.c

index c96ba9fc19e0123c1bb2e22f71821226811f71bd..f037210561905ecd1149e31570a98a112f26dc27 100644 (file)
@@ -810,7 +810,7 @@ static void pl2303_update_line_status(struct usb_serial_port *port,
        struct pl2303_private *priv = usb_get_serial_port_data(port);
        unsigned long flags;
        u8 status_idx = UART_STATE;
-       u8 length = UART_STATE;
+       u8 length = UART_STATE + 1;
 
        if ((le16_to_cpu(port->serial->dev->descriptor.idVendor) == SIEMENS_VENDOR_ID) &&
            (le16_to_cpu(port->serial->dev->descriptor.idProduct) == SIEMENS_PRODUCT_ID_X65 ||