[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: Horst Schirmeier <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

---
commit 95f209f93663103db2a8fb989e226ac68a98b036
tree 459d85d3012707d2d7d588cfff88a67c3485db48
parent 17fa6e552f2fc6bb06af767b0abf9cb642e13404
author Horst Schirmeier <[EMAIL PROTECTED]> Thu, 28 Jul 2005 15:32:20 +0200
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Wed, 04 Jan 2006 13:51:41 -0800

 drivers/usb/serial/pl2303.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index c96ba9f..f037210 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -810,7 +810,7 @@ static void pl2303_update_line_status(st
        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 ||



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to