summaryrefslogtreecommitdiffstats
path: root/mdoc_hash.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-17 11:00:18 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-17 11:00:18 +0000
commitb242d180848983c5a68cdac72768c49693a48e7f (patch)
treecfdcc4c6995eb54254c609757242e8145d9df762 /mdoc_hash.c
parente9573f136b1ae4896155ec0066bf3f7ef8bd4de0 (diff)
downloadmandoc-b242d180848983c5a68cdac72768c49693a48e7f.tar.gz
Fixed hash assertion.
Diffstat (limited to 'mdoc_hash.c')
-rw-r--r--mdoc_hash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mdoc_hash.c b/mdoc_hash.c
index d87f055b..dea68f28 100644
--- a/mdoc_hash.c
+++ b/mdoc_hash.c
@@ -127,6 +127,9 @@ mdoc_hash_find(const void *arg, const char *tmp)
ind = INDEX(major, minor);
+ if (ind < 0 || ind >= 26 * 3 * 52)
+ return(MDOC_MAX);
+
if (htab[ind]) {
slot = htab[ind] - /* LINTED */
(void *)mdoc_macros;