Initialize variables used by the Boyer-Moore algorithm.

This should fix core dumps when the must pattern is of length
three or less.

Bug found by: knu
This commit is contained in:
Daniel C. Sobral 2000-06-29 18:53:55 +00:00
parent 8bea8d9daa
commit 6b709b74ae
1 changed files with 2 additions and 0 deletions

View File

@ -246,6 +246,8 @@ int cflags;
g->nbol = 0;
g->neol = 0;
g->must = NULL;
g->charjump = NULL;
g->matchjump = NULL;
g->mlen = 0;
g->nsub = 0;
g->ncategories = 1; /* category 0 is "everything else" */