summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/chars.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mandoc/chars.c')
-rw-r--r--usr.bin/mandoc/chars.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/usr.bin/mandoc/chars.c b/usr.bin/mandoc/chars.c
index 00713a9cd30..39adcf92d3e 100644
--- a/usr.bin/mandoc/chars.c
+++ b/usr.bin/mandoc/chars.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chars.c,v 1.32 2014/10/27 13:29:30 schwarze Exp $ */
+/* $OpenBSD: chars.c,v 1.33 2014/10/28 13:22:57 schwarze Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -121,14 +121,9 @@ mchars_num2uc(const char *p, size_t sz)
{
int i;
- if ((i = mandoc_strntoi(p, sz, 16)) < 0)
- return(0xFFFD);
-
- /*
- * XXX Code is missing here to exclude bogus ranges.
- */
-
- return(i <= 0x10FFFF ? i : 0xFFFD);
+ i = mandoc_strntoi(p, sz, 16);
+ assert(i >= 0 && i <= 0x10FFFF);
+ return(i);
}
const char *