=================================================================== RCS file: /cvs/mandoc/Attic/mdoc_hash.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- mandoc/Attic/mdoc_hash.c 2009/07/17 10:56:27 1.6 +++ mandoc/Attic/mdoc_hash.c 2009/07/17 11:00:18 1.7 @@ -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 * @@ -126,6 +126,9 @@ mdoc_hash_find(const void *arg, const char *tmp) ADJUST_MINOR(minor); ind = INDEX(major, minor); + + if (ind < 0 || ind >= 26 * 3 * 52) + return(MDOC_MAX); if (htab[ind]) { slot = htab[ind] - /* LINTED */