From ab151329149e05e4d079f37ca6dc47136788cc72 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 29 Mar 2015 12:35:13 -0400 Subject: [PATCH] this fixes #1118 --- src/js/static-net-filtering.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index ba886976b..de6f04a68 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1991,7 +1991,14 @@ FilterContainer.prototype.tokenize = function(url) { tokenEntry.beg = matches.index; tokenEntry.token = matches[0]; i += 1; + + // https://github.com/gorhill/uBlock/issues/1118 + // Crazy case... but I guess we have to expect the worst... + if ( i === 2048 ) { + break; + } } + // Sentinel tokenEntry = tokens[i]; if ( tokenEntry === undefined ) {