ChangeSet 1.1832.55.36, 2004/09/08 11:22:56-07:00, [EMAIL PROTECTED]

[PATCH] USB Serial: Correct a use of out of range variable

Bug found by Coverity:
http://linuxbugs.coverity.com/external/editbugparent.php?viewbugid=2137&checkers%5B%5D=all&status%5B%5D=BUG&status%5B%5D=UNINSPECTED&status%5B%5D=UNKNOWN&status%5B%5D=DON%27T%20CARE&status%5B%5D=PENDING&product%5B%5D=all&component%5B%5D=all&file=&fn=&sortby=reverse_rank&before=&after=&curpage=2&bugid=-1&comment=&reason=

Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/serial/usb-serial.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   2004-10-19 08:17:20 -07:00
+++ b/drivers/usb/serial/usb-serial.c   2004-10-19 08:17:20 -07:00
@@ -388,7 +388,7 @@
 
                good_spot = 1;
                for (j = 1; j <= num_ports-1; ++j)
-                       if ((serial_table[i+j]) || (i+j >= SERIAL_TTY_MINORS)) {
+                       if ((i+j >= SERIAL_TTY_MINORS) || (serial_table[i+j])) {
                                good_spot = 0;
                                i += j;
                                break;



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to