wok diff pcre/stuff/r661.diff @ rev 11101
dropbear-pam: Clean up.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Mon Oct 17 02:57:16 2011 +0000 (2011-10-17) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/pcre/stuff/r661.diff Mon Oct 17 02:57:16 2011 +0000 1.3 @@ -0,0 +1,26 @@ 1.4 +--- code/trunk/pcre_compile.c 2011/08/02 11:00:40 654 1.5 ++++ code/trunk/pcre_compile.c 2011/08/21 09:00:54 661 1.6 +@@ -2295,8 +2295,13 @@ 1.7 + A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not. 1.8 + It seems that the appearance of a nested POSIX class supersedes an apparent 1.9 + external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or 1.10 +-a digit. Also, unescaped square brackets may also appear as part of class 1.11 +-names. For example, [:a[:abc]b:] gives unknown class "[:abc]b:]"in Perl. 1.12 ++a digit. 1.13 ++ 1.14 ++In Perl, unescaped square brackets may also appear as part of class names. For 1.15 ++example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for 1.16 ++[:a[:abc]b][b:] it gives unknown POSIX class "[:abc]b][b:]", which does not 1.17 ++seem right at all. PCRE does not allow closing square brackets in POSIX class 1.18 ++names. 1.19 + 1.20 + Arguments: 1.21 + ptr pointer to the initial [ 1.22 +@@ -2314,6 +2319,7 @@ 1.23 + { 1.24 + if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET) 1.25 + ptr++; 1.26 ++ else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE; 1.27 + else 1.28 + { 1.29 + if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)