Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb It should be allowed to have exactly a usb_descr...



details:   https://anonhg.NetBSD.org/src/rev/2bb3d21a23bf
branches:  trunk
changeset: 932759:2bb3d21a23bf
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri May 15 07:51:49 2020 +0000

description:
It should be allowed to have exactly a usb_descriptor_t.

diffstat:

 sys/dev/usb/usbdi_util.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r cf4f6965127b -r 2bb3d21a23bf sys/dev/usb/usbdi_util.c
--- a/sys/dev/usb/usbdi_util.c  Fri May 15 07:47:53 2020 +0000
+++ b/sys/dev/usb/usbdi_util.c  Fri May 15 07:51:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi_util.c,v 1.82 2020/03/13 18:17:41 christos Exp $ */
+/*     $NetBSD: usbdi_util.c,v 1.83 2020/05/15 07:51:49 maxv Exp $     */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.82 2020/03/13 18:17:41 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.83 2020/05/15 07:51:49 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -733,7 +733,7 @@
 {
        const usb_descriptor_t *desc;
 
-       if (iter->cur + sizeof(usb_descriptor_t) >= iter->end) {
+       if (iter->cur + sizeof(usb_descriptor_t) > iter->end) {
                if (iter->cur != iter->end)
                        printf("%s: bad descriptor\n", __func__);
                return NULL;



Home | Main Index | Thread Index | Old Index