Fix an intermittent build failure caused by a segfault in dfasyn.

okay sthen
This commit is contained in:
kurt 2009-04-24 14:43:16 +00:00
parent 6ee24a7d07
commit 059631fba2
2 changed files with 14 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.6 2008/02/12 22:11:48 sthen Exp $
# $OpenBSD: Makefile,v 1.7 2009/04/24 14:43:16 kurt Exp $
COMMENT= program for indexing & searching email
DISTNAME= mairix-0.21
PKGNAME= ${DISTNAME}p0
CATEGORIES= mail
HOMEPAGE= http://www.rpcurnow.force9.co.uk/mairix/

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-dfasyn_compdfa_c,v 1.1 2009/04/24 14:43:16 kurt Exp $
--- dfasyn/compdfa.c.orig Sun Apr 19 09:57:26 2009
+++ dfasyn/compdfa.c Sun Apr 19 09:56:53 2009
@@ -425,7 +425,7 @@ do_next_dfa_state:
for (j=0; j<ntokens; j++) {
int next_state = dfas[i]->map[j];
- if (leads_to_result[next_state] == 0) {
+ if ((next_state >= 0) && leads_to_result[next_state] == 0) {
dfas[i]->map[j] = -1;
}
}