Skip to content

Commit a95f6ea

Browse files
committed
Merge pull request requirejs#304 from lcbarcellos/patch-1
Infinite loop potential in rhino/optimizer module
2 parents a75ecfb + 1d46b1c commit a95f6ea

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build/jslib/rhino/optimize.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ define(['logger', 'env!env/file'], function (logger, file) {
2121
if (arguments.length >= 2) {
2222
accumulator = arguments[1];
2323
} else {
24-
do {
25-
if (i in this) {
26-
accumulator = this[i++];
27-
break;
24+
if (length) {
25+
while (!(i in this)) {
26+
i++;
2827
}
28+
accumulator = this[i++];
2929
}
30-
while (true);
3130
}
3231

3332
for (; i < length; i++) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy