Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons Correct wrong assertion code introduced by re...
details: https://anonhg.NetBSD.org/src/rev/ea823e8c2354
branches: trunk
changeset: 829178:ea823e8c2354
user: rin <rin%NetBSD.org@localhost>
date: Sat Jan 20 23:27:06 2018 +0000
description:
Correct wrong assertion code introduced by rev 1.41:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/wscons/wsemul_vt100.c#rev1.41
Fix kernel panic reported in PR kern/52935.
diffstat:
sys/dev/wscons/wsemul_vt100.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ea3785520685 -r ea823e8c2354 sys/dev/wscons/wsemul_vt100.c
--- a/sys/dev/wscons/wsemul_vt100.c Sat Jan 20 19:36:47 2018 +0000
+++ b/sys/dev/wscons/wsemul_vt100.c Sat Jan 20 23:27:06 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_vt100.c,v 1.41 2017/11/03 19:20:27 maya Exp $ */
+/* $NetBSD: wsemul_vt100.c,v 1.42 2018/01/20 23:27:06 rin Exp $ */
/*
* Copyright (c) 1998
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.41 2017/11/03 19:20:27 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100.c,v 1.42 2018/01/20 23:27:06 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_wsmsgattrs.h"
@@ -1006,7 +1006,7 @@
wsemul_vt100_output_normal(edp, *data, kernel);
continue;
}
- KASSERT(edp->state < __arraycount(vt100_output) - 1);
+ KASSERT(edp->state <= __arraycount(vt100_output));
edp->state = vt100_output[edp->state - 1](edp, *data);
}
if (vd->flags & VTFL_CURSORON)
Home |
Main Index |
Thread Index |
Old Index