mirror of https://github.com/gorhill/uBlock.git
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