about summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim@codesourcery.com>2012-10-15 17:22:41 -0700
committerMaxim Kuvyrkov <maxim@codesourcery.com>2012-10-15 17:22:41 -0700
commite9f372520618161d7d73e028ca23818e83b88bbc (patch)
treefe653203bdee68e734135ade5c34b2f3aa515611 /string
parentb8d7c0968c095d25fded0e2dfea1a16b1fd42911 (diff)
downloadglibc-e9f372520618161d7d73e028ca23818e83b88bbc.tar.gz
glibc-e9f372520618161d7d73e028ca23818e83b88bbc.tar.xz
glibc-e9f372520618161d7d73e028ca23818e83b88bbc.zip
Fix BZ #14716: memmem crash
Diffstat (limited to 'string')
-rw-r--r--string/str-two-way.h4
1 files changed, 2 insertions, 2 deletions
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;