aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-11-01 04:03:49 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-11-01 04:03:49 +0000
commit87762e476141496baf99b8db674bb45f9f50cb03 (patch)
tree9195a9aa088e2f2dfe6ddd3070cb29dd62351701 /term.c
parentacfdb709430f9bd1b754ed016c7fdef33d9f8b95 (diff)
downloadmandoc-87762e476141496baf99b8db674bb45f9f50cb03.tar.gz
mandoc-87762e476141496baf99b8db674bb45f9f50cb03.tar.zst
mandoc-87762e476141496baf99b8db674bb45f9f50cb03.zip
fix a typo causing crashes in Unicode string length measurement
Diffstat (limited to 'term.c')
-rw-r--r--term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/term.c b/term.c
index d51243b1..dc30cca5 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.233 2014/10/29 00:17:43 schwarze Exp $ */
+/* $Id: term.c,v 1.234 2014/11/01 04:03:49 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -684,7 +684,7 @@ term_strlen(const struct termp *p, const char *cp)
switch (esc) {
case ESCAPE_UNICODE:
- uc = mchars_num2uc(seq + 1, sz - 1);
+ uc = mchars_num2uc(seq + 1, ssz - 1);
break;
case ESCAPE_NUMBERED:
uc = mchars_num2char(seq, ssz);