From 103df7a64794f4bd05b912bcb3e9e94330cbfd74 Mon Sep 17 00:00:00 2001 From: dcs Date: Thu, 29 Jun 2000 18:53:55 +0000 Subject: 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 --- lib/libc/regex/regcomp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libc/regex') diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index f71d63c..bb8f677 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -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" */ -- cgit v1.1