dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Database: Allow selectFieldValues() to accept SQL fragments
[lhc/web/wiklou.git]
/
includes
/
libs
/
JavaScriptMinifier.php
diff --git
a/includes/libs/JavaScriptMinifier.php
b/includes/libs/JavaScriptMinifier.php
index
a1a93d2
..
5ecfc7c
100644
(file)
--- a/
includes/libs/JavaScriptMinifier.php
+++ b/
includes/libs/JavaScriptMinifier.php
@@
-498,6
+498,13
@@
class JavaScriptMinifier {
} while ( $end - 2 < $length && $s[$end - 2] === '\\' );
// Correction (1): Undo speculative add, keep only one (end of regexp)
$end--;
} while ( $end - 2 < $length && $s[$end - 2] === '\\' );
// Correction (1): Undo speculative add, keep only one (end of regexp)
$end--;
+ if ( $end > $length ) {
+ // Correction (2): Loop wrongly assumed "]" was seen
+ // String ended without ending char class or regexp. Correct $end.
+ // TODO: This is invalid and should throw.
+ $end--;
+ break;
+ }
}
// Search past the regexp modifiers (gi)
while ( $end < $length && ctype_alpha( $s[$end] ) ) {
}
// Search past the regexp modifiers (gi)
while ( $end < $length && ctype_alpha( $s[$end] ) ) {