Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/usb Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/654898a4746b
branches:  netbsd-9
changeset: 370136:654898a4746b
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Sep 18 13:32:27 2022 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1528):

        sys/dev/usb/if_ure.c: revision 1.58 (via patch)

Use unsigned to avoid undefined behavior in ure_uno_mcast(). Found by kUBSan.

diffstat:

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

diffs (27 lines):

diff -r 7e08619f37b4 -r 654898a4746b sys/dev/usb/if_ure.c
--- a/sys/dev/usb/if_ure.c      Sun Sep 18 13:28:49 2022 +0000
+++ b/sys/dev/usb/if_ure.c      Sun Sep 18 13:32:27 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ure.c,v 1.14.2.2 2019/10/17 18:53:25 martin Exp $   */
+/*     $NetBSD: if_ure.c,v 1.14.2.3 2022/09/18 13:32:27 martin Exp $   */
 /*     $OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $ */
 
 /*-
@@ -30,7 +30,7 @@
 /* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.14.2.2 2019/10/17 18:53:25 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.14.2.3 2022/09/18 13:32:27 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -381,7 +381,7 @@
                        hash = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN)
                            >> 26;
                        if (hash < 32)
-                               hashes[0] |= (1 << hash);
+                               hashes[0] |= (1U << hash);
                        else
                                hashes[1] |= (1 << (hash - 32));
 



Home | Main Index | Thread Index | Old Index