summaryrefslogtreecommitdiff
path: root/src/string/memrchr.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-04-09 21:06:17 -0400
committerRich Felker <dalias@aerifal.cx>2014-04-09 21:06:17 -0400
commit6fbdeff0e51f6afc38fbb1476a4db81322779da4 (patch)
tree9f8efc8cfbdb13ec99fa396bdf68b1d304cedc30 /src/string/memrchr.c
parente94d0692864ecf9522fd6a97610a47a2f718d3de (diff)
downloadmusl-6fbdeff0e51f6afc38fbb1476a4db81322779da4.tar.gz
musl-6fbdeff0e51f6afc38fbb1476a4db81322779da4.tar.bz2
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/memrchr.c')
0 files changed, 0 insertions, 0 deletions