Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/net Pull up following revision(s) (requested by msait...
details: https://anonhg.NetBSD.org/src/rev/ad65688132fa
branches: netbsd-9
changeset: 359889:ad65688132fa
user: martin <martin%NetBSD.org@localhost>
date: Sat Jan 29 17:03:53 2022 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #1411):
sys/net/ppp_tty.c: revision 1.68
sys/net/ppp_tty.c: revision 1.69
Use unsigned to avoid undefined behavior in pppasyncstart().
Use unsigned to avoid undefined behavior. Found by kUBSan.
diffstat:
sys/net/ppp_tty.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r c4376f5e0370 -r ad65688132fa sys/net/ppp_tty.c
--- a/sys/net/ppp_tty.c Sat Jan 29 16:59:31 2022 +0000
+++ b/sys/net/ppp_tty.c Sat Jan 29 17:03:53 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ppp_tty.c,v 1.65 2019/01/24 09:31:09 knakahara Exp $ */
+/* $NetBSD: ppp_tty.c,v 1.65.4.1 2022/01/29 17:03:53 martin Exp $ */
/* Id: ppp_tty.c,v 1.3 1996/07/01 01:04:11 paulus Exp */
/*
@@ -93,7 +93,7 @@
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppp_tty.c,v 1.65 2019/01/24 09:31:09 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppp_tty.c,v 1.65.4.1 2022/01/29 17:03:53 martin Exp $");
#ifdef _KERNEL_OPT
#include "ppp.h"
@@ -181,7 +181,7 @@
/*
* Does c need to be escaped?
*/
-#define ESCAPE_P(c) (sc->sc_asyncmap[(c) >> 5] & (1 << ((c) & 0x1F)))
+#define ESCAPE_P(c) (sc->sc_asyncmap[(c) >> 5] & (1U << ((c) & 0x1F)))
/*
* Procedures for using an async tty interface for PPP.
@@ -1021,7 +1021,7 @@
sc->sc_flags |= SC_RCV_B7_1;
else
sc->sc_flags |= SC_RCV_B7_0;
- if (paritytab[c >> 5] & (1 << (c & 0x1F)))
+ if (paritytab[c >> 5] & (1U << (c & 0x1F)))
sc->sc_flags |= SC_RCV_ODDP;
else
sc->sc_flags |= SC_RCV_EVNP;
@@ -1102,7 +1102,7 @@
return 0;
}
- if (c < 0x20 && (sc->sc_rasyncmap & (1 << c)))
+ if (c < 0x20 && (sc->sc_rasyncmap & (1U << c)))
return 0;
s = spltty();
Home |
Main Index |
Thread Index |
Old Index