This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix strstr, memmem, strcasestr


On 10/06/2010 03:31 AM, Corinna Vinschen wrote:
On Oct 5 17:31, Eric Blake wrote:
Since it's a bug in my original implementation, and the fix is a
single line swap, I'm pushing the fix as obvious (whether the
algorithm is obvious is a different question).
[...]
	memmem, strstr, strcasestr: fix bug with long periodic needle
	* lib/str-two-way.h (two_way_long_needle): Avoid bug with long
	periodic needle having false positive.

I didn't see it in CVS so I just applied it.

Thanks; I was doing another round of testing, then ran out of time yesterday. But my testing was successful, no further correctness changes needed (although I may come up with some optimization changes later on).


--
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]