Module Name: src Committed By: msaitoh Date: Tue Dec 11 09:17:32 UTC 2012
Modified Files: src/sys/dev/usb: ubsa_common.c Log Message: Fix off by one read error. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/usb/ubsa_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/ubsa_common.c diff -u src/sys/dev/usb/ubsa_common.c:1.8 src/sys/dev/usb/ubsa_common.c:1.9 --- src/sys/dev/usb/ubsa_common.c:1.8 Fri Feb 24 06:48:25 2012 +++ src/sys/dev/usb/ubsa_common.c Tue Dec 11 09:17:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ubsa_common.c,v 1.8 2012/02/24 06:48:25 mrg Exp $ */ +/* $NetBSD: ubsa_common.c,v 1.9 2012/12/11 09:17:31 msaitoh Exp $ */ /*- * Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>. * All rights reserved. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ubsa_common.c,v 1.8 2012/02/24 06:48:25 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubsa_common.c,v 1.9 2012/12/11 09:17:31 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -105,7 +105,7 @@ ubsa_request(struct ubsa_softc *sc, int else req.bmRequestType = UT_WRITE_VENDOR_DEVICE; - if (portno > UBSA_MAXCONN) { + if (portno >= UBSA_MAXCONN) { printf("%s: ubsa_request: invalid port(%d)#\n", device_xname(sc->sc_dev), portno); return USBD_INVAL;