Fix TypedArray overflow

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3582
This commit is contained in:
Raymond Hill 2025-03-20 07:14:38 -04:00
parent 94f73015ed
commit 76b80baaea
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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();