diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-04-09 21:06:17 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-04-09 21:06:17 -0400 |
commit | 6fbdeff0e51f6afc38fbb1476a4db81322779da4 (patch) | |
tree | 9f8efc8cfbdb13ec99fa396bdf68b1d304cedc30 /src/string/wcslen.c | |
parent | e94d0692864ecf9522fd6a97610a47a2f718d3de (diff) | |
download | musl-6fbdeff0e51f6afc38fbb1476a4db81322779da4.tar.gz musl-6fbdeff0e51f6afc38fbb1476a4db81322779da4.tar.xz musl-6fbdeff0e51f6afc38fbb1476a4db81322779da4.zip |
fix search past the end of haystack in memmem
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.
Diffstat (limited to 'src/string/wcslen.c')
0 files changed, 0 insertions, 0 deletions