mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
code review: fix handling of too long needles
This commit is contained in:
parent
13f2b6b86f
commit
2a91a685ce
@ -88,7 +88,7 @@ const hnTrieManager = {
|
||||
if ( needle !== this.needle ) {
|
||||
const buf = this.trie;
|
||||
let i = needle.length;
|
||||
if ( i > 255 ) { i = 255; }
|
||||
if ( i > 254 ) { i = 254; }
|
||||
buf[255] = i;
|
||||
while ( i-- ) {
|
||||
buf[i] = needle.charCodeAt(i);
|
||||
|
Loading…
Reference in New Issue
Block a user