summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mandocdb.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index e44d5fd7..bbb7b0f9 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1373,7 +1373,12 @@ parse_cat(struct mpage *mpage, int fd)
plen -= 2;
}
- mpage->desc = mandoc_strdup(p);
+ /*
+ * Cut off excessive one-line descriptions.
+ * Bad pages are not worth better heuristics.
+ */
+
+ mpage->desc = mandoc_strndup(p, 150);
fclose(stream);
free(title);
}
@@ -1517,7 +1522,12 @@ parse_man(struct mpage *mpage, const struct roff_meta *meta,
while (' ' == *start)
start++;
- mpage->desc = mandoc_strdup(start);
+ /*
+ * Cut off excessive one-line descriptions.
+ * Bad pages are not worth better heuristics.
+ */
+
+ mpage->desc = mandoc_strndup(start, 150);
free(title);
return;
}