From 76b80baaeabc1732bbe970708a142dbad86509df Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 20 Mar 2025 07:14:38 -0400 Subject: [PATCH] Fix TypedArray overflow Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/3582 --- src/js/static-net-filtering.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index acfb5d144..a5973f525 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -3100,7 +3100,7 @@ const urlTokenizer = new (class { this._hasQuery = 0; // https://www.reddit.com/r/uBlockOrigin/comments/dzw57l/ // Remember: 1 token needs two slots - this._tokens = new Uint32Array(2064); + this._tokens = new Uint32Array(bidiTrie.haystack.length + 16); this.knownTokens = new Uint8Array(65536); this.resetKnownTokens();