summaryrefslogtreecommitdiffstats
path: root/lib/libc/regex
diff options
context:
space:
mode:
authordcs <dcs@FreeBSD.org>2000-06-29 18:53:55 +0000
committerdcs <dcs@FreeBSD.org>2000-06-29 18:53:55 +0000
commit103df7a64794f4bd05b912bcb3e9e94330cbfd74 (patch)
tree95132035c3b7214f1ea37195d6667eda49b0b199 /lib/libc/regex
parent3d5033b596bc4aae3f44baa594a35ef4d94e35a2 (diff)
downloadFreeBSD-src-103df7a64794f4bd05b912bcb3e9e94330cbfd74.zip
FreeBSD-src-103df7a64794f4bd05b912bcb3e9e94330cbfd74.tar.gz
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
Diffstat (limited to 'lib/libc/regex')
-rw-r--r--lib/libc/regex/regcomp.c2
1 files changed, 2 insertions, 0 deletions
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" */
OpenPOWER on IntegriCloud