Commit 95f209f9 authored by Horst Schirmeier's avatar Horst Schirmeier Committed by Greg Kroah-Hartman

[PATCH] USB: pl2303_update_line_status data length fix

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: default avatarHorst Schirmeier <horst@schirmeier.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 17fa6e55
...@@ -810,7 +810,7 @@ static void pl2303_update_line_status(struct usb_serial_port *port, ...@@ -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); struct pl2303_private *priv = usb_get_serial_port_data(port);
unsigned long flags; unsigned long flags;
u8 status_idx = UART_STATE; 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) && if ((le16_to_cpu(port->serial->dev->descriptor.idVendor) == SIEMENS_VENDOR_ID) &&
(le16_to_cpu(port->serial->dev->descriptor.idProduct) == SIEMENS_PRODUCT_ID_X65 || (le16_to_cpu(port->serial->dev->descriptor.idProduct) == SIEMENS_PRODUCT_ID_X65 ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment