The branch main has been updated by arichardson:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=94ac312a71683a3a1a928c6adfe927d6bb45044f

commit 94ac312a71683a3a1a928c6adfe927d6bb45044f
Author:     Alex Richardson <arichard...@freebsd.org>
AuthorDate: 2021-01-19 11:35:21 +0000
Commit:     Alex Richardson <arichard...@freebsd.org>
CommitDate: 2021-01-25 15:09:50 +0000

    ifconfig: fix UBSan signed shift error
    
    Use 1u since UBSan complains about 1 << 31.
---
 sbin/ifconfig/ifconfig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index e6e7908e18cd..90a84f2996bc 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1514,7 +1514,7 @@ printb(const char *s, unsigned v, const char *bits)
                bits++;
                putchar('<');
                while ((i = *bits++) != '\0') {
-                       if (v & (1 << (i-1))) {
+                       if (v & (1u << (i-1))) {
                                if (any)
                                        putchar(',');
                                any = 1;
_______________________________________________
dev-commits-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "dev-commits-src-all-unsubscr...@freebsd.org"

Reply via email to