Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Fix off-by-one in rx packet processing
details: https://anonhg.NetBSD.org/src/rev/81b72ae1cda4
branches: trunk
changeset: 361779:81b72ae1cda4
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri May 11 10:59:30 2018 +0000
description:
Fix off-by-one in rx packet processing
diffstat:
sys/dev/usb/if_bwfm_usb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r b48bddc96cdb -r 81b72ae1cda4 sys/dev/usb/if_bwfm_usb.c
--- a/sys/dev/usb/if_bwfm_usb.c Fri May 11 09:43:59 2018 +0000
+++ b/sys/dev/usb/if_bwfm_usb.c Fri May 11 10:59:30 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bwfm_usb.c,v 1.5 2018/05/11 07:41:11 maya Exp $ */
+/* $NetBSD: if_bwfm_usb.c,v 1.6 2018/05/11 10:59:30 jmcneill Exp $ */
/* $OpenBSD: if_bwfm_usb.c,v 1.2 2017/10/15 14:55:13 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
@@ -485,7 +485,7 @@
goto resubmit;
len -= sizeof(*hdr);
off += sizeof(*hdr);
- if (len < hdr->data_offset << 2)
+ if (len <= hdr->data_offset << 2)
goto resubmit;
len -= hdr->data_offset << 2;
off += hdr->data_offset << 2;
Home |
Main Index |
Thread Index |
Old Index