Skip to content

Commit

Permalink
Undo the fix to make sure it breaks address sanitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
sweeneyde committed Jul 12, 2023
1 parent d43d987 commit f57b797
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Objects/bytesobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,7 @@ _PyBytes_Find(const char *haystack, Py_ssize_t len_haystack,
const char *needle, Py_ssize_t len_needle,
Py_ssize_t offset)
{
#if 0
assert(len_haystack >= 0);
assert(len_needle >= 0);
// Extra checks because stringlib_find accesses haystack[len_haystack].
Expand All @@ -1291,6 +1292,10 @@ _PyBytes_Find(const char *haystack, Py_ssize_t len_haystack,
}
}
return res;
#else
return stringlib_find(haystack, len_haystack,
needle, len_needle, offset);
#endif
}

Py_ssize_t
Expand Down

0 comments on commit f57b797

Please sign in to comment.