aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_hash.c')
-rw-r--r--mdoc_hash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mdoc_hash.c b/mdoc_hash.c
index 0e14b235..c1558224 100644
--- a/mdoc_hash.c
+++ b/mdoc_hash.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_hash.c,v 1.6 2009/07/17 10:56:27 kristaps Exp $ */
+/* $Id: mdoc_hash.c,v 1.7 2009/07/17 11:00:18 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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;