Skip to content

Commit

Permalink
Fix not properly resetting needle buffer in createTrieFromStoredDomai…
Browse files Browse the repository at this point in the history
…nOpt()

Related issue:
- uBlockOrigin/uBlock-issues#1902

The cached needle didn't match the one stored in the
needle buffer when resetting the cached needle without
resetting the needle buffer.
  • Loading branch information
gorhill committed Dec 25, 2021
1 parent 7998ead commit d66cd11
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/hntrie.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ class HNTrieContainer {
this.add(itrie);
}
}
this.needle = ''; // Important
this.needle = ''; // Important
this.buf[255] = 0; // Important
return itrie;
}

Expand Down

0 comments on commit d66cd11

Please sign in to comment.