From 1103b67eb8cdf02098b09f79d73f26c897e4db96 Mon Sep 17 00:00:00 2001 From: Norihiro Tanaka Date: Tue, 11 Aug 2015 00:37:00 +0900 Subject: [PATCH] grep: avoid use of uninitialized variable * src/dfasearch.c (EGexecute): Initialize backref. --- src/dfasearch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dfasearch.c b/src/dfasearch.c index 8b8af06..de51321 100644 --- a/src/dfasearch.c +++ b/src/dfasearch.c @@ -207,7 +207,6 @@ EGexecute (char const *buf, size_t size, size_t *match_size, { char const *buflim, *beg, *end, *ptr, *match, *best_match, *mb_start; char eol = eolbyte; - int backref; regoff_t start; size_t len, best_len; struct kwsmatch kwsm; @@ -227,6 +226,7 @@ EGexecute (char const *buf, size_t size, size_t *match_size, char const *next_beg, *dfa_beg = beg; size_t count = 0; bool exact_kwset_match = false; + int backref = 0; /* Try matching with KWset, if it's defined. */ if (kwset) -- 2.4.6