-/* $Id: mdoc_hash.c,v 1.6 2009/07/17 10:56:27 kristaps Exp $ */
+/* $Id: mdoc_hash.c,v 1.8 2009/07/20 20:49:22 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <sys/types.h>
+
#include <assert.h>
#include <ctype.h>
#include <stdlib.h>
ind = INDEX(major, minor);
+ if (ind < 0 || ind >= 26 * 3 * 52)
+ return(MDOC_MAX);
+
if (htab[ind]) {
slot = htab[ind] - /* LINTED */
(void *)mdoc_macros;