From e9f372520618161d7d73e028ca23818e83b88bbc Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Mon, 15 Oct 2012 17:22:41 -0700 Subject: Fix BZ #14716: memmem crash --- string/str-two-way.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'string') diff --git a/string/str-two-way.h b/string/str-two-way.h index d2572da408..d082fe0a09 100644 --- a/string/str-two-way.h +++ b/string/str-two-way.h @@ -309,13 +309,13 @@ two_way_short_needle (const unsigned char *haystack, size_t haystack_len, != (haystack_char = CANON_ELEMENT (*phaystack++))) { RET0_IF_0 (haystack_char); -#if CHECK_EOL +#if !CHECK_EOL ++j; #endif continue; } -#if !CHECK_EOL +#if CHECK_EOL /* Calculate J if it wasn't kept up-to-date in the first-character loop. */ j = phaystack - &haystack[suffix] - 1; -- cgit v1.2.3