diff options
author | 2009-11-03 14:24:09 +0000 | |
---|---|---|
committer | 2009-11-03 14:24:09 +0000 | |
commit | d886bcfeff3966f63b8fdff847d1e46374e3863f (patch) | |
tree | db6af8d078f772eda7bda3214730479016806e49 /gnu/usr.bin/perl/regcomp.c | |
parent | print the correct info (need some tweaks yet to be shorter). (diff) | |
download | wireguard-openbsd-d886bcfeff3966f63b8fdff847d1e46374e3863f.tar.xz wireguard-openbsd-d886bcfeff3966f63b8fdff847d1e46374e3863f.zip |
- apply fix from upstream git for CVE-2009-3626, which could cause perl to
crash on certain invalid UTF-8 codes.
ok millert@ sthen@
Diffstat (limited to 'gnu/usr.bin/perl/regcomp.c')
-rw-r--r-- | gnu/usr.bin/perl/regcomp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gnu/usr.bin/perl/regcomp.c b/gnu/usr.bin/perl/regcomp.c index 49e69b226d4..b7fb032338d 100644 --- a/gnu/usr.bin/perl/regcomp.c +++ b/gnu/usr.bin/perl/regcomp.c @@ -2820,13 +2820,18 @@ S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, } } else { /* - Currently we assume that the trie can handle unicode and ascii - matches fold cased matches. If this proves true then the following - define will prevent tries in this situation. - - #define TRIE_TYPE_IS_SAFE (UTF || optype==EXACT) -*/ + Currently we do not believe that the trie logic can + handle case insensitive matching properly when the + pattern is not unicode (thus forcing unicode semantics). + + If/when this is fixed the following define can be swapped + in below to fully enable trie logic. + #define TRIE_TYPE_IS_SAFE 1 + +*/ +#define TRIE_TYPE_IS_SAFE (UTF || optype==EXACT) + if ( last && TRIE_TYPE_IS_SAFE ) { make_trie( pRExC_state, startbranch, first, cur, tail, count, |