| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
the logic for this loop was copied from null-terminated-string logic
in strstr without properly adapting it to work with explicit lengths.
presumably this error could result in false negatives (wrongly
comparing past the end of the needle/haystack), false positives
(stopping comparison early when the needle contains null bytes), and
crashes (from runaway reads past the end of mapped memory).
(cherry picked from commit cef0f289f666b6c963bfd11537a6d80916ff889e)
|
|
|
|
|
|
|
|
|
|
| |
in cases where the memorized match range from the right factor
exceeded the length of the left factor, it was wrongly treated as a
mismatch rather than a match.
issue reported by Yves Bastide.
(cherry picked from commit 476cd1d96560aaf7f210319597556e7fbcd60469)
|
|
|
|
|
|
|
|
|
|
| |
to optimize the search, memchr is used to find the first occurrence of
the first character of the needle in the haystack before switching to
a search for the full needle. however, the number of characters
skipped by this first step were not subtracted from the haystack
length, causing memmem to search past the end of the haystack.
(cherry picked from commit 6fbdeff0e51f6afc38fbb1476a4db81322779da4)
|
| |
|
|
based on strstr. passes gnulib tests and a few quick checks of my own.
|