Reverting r76928, causes segfault
authorSam Reed <reedy@users.mediawiki.org>
Thu, 18 Nov 2010 02:32:58 +0000 (02:32 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 18 Nov 2010 02:32:58 +0000 (02:32 +0000)
includes/IP.php

index 356c770..9aeba39 100644 (file)
@@ -42,7 +42,7 @@ define( 'RE_IPV6_ADD',
        '|' . // has no "::"
                RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){7}' .
        '|' . // contains one "::" in the middle (awkward regex for PCRE 4.0+ compatibility)
-               RE_IPV6_WORD . '(?::(?P<abn>(?!(?P=abn)):(?P<iabn>))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' .
+               RE_IPV6_WORD . '(?::(?!(?P=abn))(?P<abn>:(?P<iabn>))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' .
                // NOTE: (?!(?P=abn)) fails iff "::" used twice; (?P=iabn) passes iff a "::" was found.
                
                // Better regexp (PCRE 7.2+ only), allows intuitive regex concatenation