[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Fix a 4-year-old used-uninitialized bug in regcomp.c.
From: |
Jim Meyering |
Subject: |
FYI: Fix a 4-year-old used-uninitialized bug in regcomp.c. |
Date: |
Sat, 01 Dec 2007 21:12:48 +0100 |
FYI, I hit this while doing pre-release testing for coreutils:
[yes, it affects the latest glibc, too]
2007-12-01 Jim Meyering <address@hidden>
Fix a bug that inhibited much of the utf8-optimization in regcomp.c.
* lib/regcomp.c (optimize_utf8): Fix a typo, s/idx/ctx_type/,
that would inhibit utf8-optimization of a regexp containing line-
or buffer-anchors, e.g., `^', `$'.
diff --git a/lib/regcomp.c b/lib/regcomp.c
index fe4d243..a02418d 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1049,7 +1049,7 @@ optimize_utf8 (re_dfa_t *dfa)
mb_chars = true;
break;
case ANCHOR:
- switch (dfa->nodes[node].opr.idx)
+ switch (dfa->nodes[node].opr.ctx_type)
{
case LINE_FIRST:
case LINE_LAST:
--
1.5.3.6.970.gd25430
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Fix a 4-year-old used-uninitialized bug in regcomp.c.,
Jim Meyering <=