summaryrefslogtreecommitdiff
path: root/src/man.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/man.c')
-rw-r--r--src/man.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/man.c b/src/man.c
index 27cd2e4..8ff4a9f 100644
--- a/src/man.c
+++ b/src/man.c
@@ -20,6 +20,9 @@ static void escape_man(cmark_strbuf *dest, const unsigned char *source, int leng
while (i < length) {
len = utf8proc_iterate(source + i, length - i, &c);
+ if (len == -1) { // error condition
+ return; // return without rendering anything
+ }
switch(c) {
case 46:
if (beginLine) {