summaryrefslogtreecommitdiffstats
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
commitd56e1e4fc2e21ba1b22e1ab3b24ea5bd71b8a659 (patch)
tree747af0688fcd24e336ed7fd96b91287edbec975d /term.c
parentb1573399d364f789f4e71b2dc02d52688bdd1605 (diff)
downloadmandoc-d56e1e4fc2e21ba1b22e1ab3b24ea5bd71b8a659.tar.gz
fix a typo causing crashes in Unicode string length measurement
Diffstat (limited to 'term.c')
-rw-r--r--term.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term.c b/term.c
index 9b7ccb27..25e0e0fd 100644
--- a/term.c
+++ b/term.c
@@ -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);