From 86751a0fee731e2d48093706a5a7cedceec25433 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 17 Jul 2009 11:00:18 +0000 Subject: Fixed hash assertion. --- mdoc_hash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mdoc_hash.c') 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 * @@ -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; -- cgit v1.2.3-56-ge451