Module Name:    src
Committed By:   martin
Date:           Sun Sep 18 13:32:27 UTC 2022

Modified Files:
        src/sys/dev/usb [netbsd-9]: if_ure.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.2 -r1.14.2.3 src/sys/dev/usb/if_ure.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/if_ure.c
diff -u src/sys/dev/usb/if_ure.c:1.14.2.2 src/sys/dev/usb/if_ure.c:1.14.2.3
--- src/sys/dev/usb/if_ure.c:1.14.2.2	Thu Oct 17 18:53:25 2019
+++ src/sys/dev/usb/if_ure.c	Sun Sep 18 13:32:27 2022
@@ -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 @@ allmulti:	
 			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));
 

Reply via email to