Skip to content

Commit

Permalink
Change wording from "malicious" to "incorrect"
Browse files Browse the repository at this point in the history
  • Loading branch information
SkiFire13 committed Jan 20, 2024
1 parent 3fccd37 commit 1c2aa52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regex-automata/src/util/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl<'h> Input<'h> {
/// Create a new search configuration for the given haystack.
#[inline]
pub fn new<H: ?Sized + AsRef<[u8]>>(haystack: &'h H) -> Input<'h> {
// Perform only one call to `haystack.as_ref()` to protect from malicious
// Perform only one call to `haystack.as_ref()` to protect from incorrect
// implementations that return different values from multiple calls.
// This is important because there's code that relies on `span` not being
// out of bounds with respect to the stored `haystack`.
Expand Down Expand Up @@ -1973,7 +1973,7 @@ mod tests {
}

#[test]
fn malicious_asref_guard() {
fn incorrect_asref_guard() {
struct Bad(std::cell::Cell<bool>);

impl AsRef<[u8]> for Bad {
Expand Down

0 comments on commit 1c2aa52

Please # to comment.