fix false negatives with periodic needles in strstr, wcsstr, and memmem
authorRich Felker <dalias@aerifal.cx>
Fri, 18 Apr 2014 21:38:35 +0000 (17:38 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 20 May 2014 21:58:24 +0000 (17:58 -0400)
commite65bb40b30d4422f2d6ac2e1ae542e7879ddc13f
tree7ba618d94b09c38638f8ff92688c663a45011bf2
parent84613196aad69fad6d1a2c1814fe0bfea67efbd7
fix false negatives with periodic needles in strstr, wcsstr, and memmem

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)
src/string/memmem.c
src/string/strstr.c
src/string/wcsstr.c