diff options
author | Ulrich Drepper <drepper@redhat.com> | 2010-07-30 00:09:07 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-07-30 00:09:07 -0700 |
commit | fe36dd025ea34c5c082b688592618ec72369b96b (patch) | |
tree | 7f5b4ec677ee5ffb364c47298c0233fbb3ddbd6d | |
parent | 76e6d6bca72c611653e70d67c2168d2e91a371eb (diff) | |
download | glibc-fe36dd025ea34c5c082b688592618ec72369b96b.zip glibc-fe36dd025ea34c5c082b688592618ec72369b96b.tar.gz glibc-fe36dd025ea34c5c082b688592618ec72369b96b.tar.bz2 |
Fix tolower operation in strcasestr.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | string/test-strcasestr.c | 2 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/strstr.c | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2010-07-30 Ulrich Drepper <drepper@redhat.com> + + * string/test-strcasestr.c: Test both ends of the range of characters. + * sysdeps/x86_64/multiarch/strstr.c: Fix UCHIGH definition. + 2010-07-29 Roland McGrath <roland@redhat.com> [BZ #11856] diff --git a/string/test-strcasestr.c b/string/test-strcasestr.c index 547537c..edc41f3 100644 --- a/string/test-strcasestr.c +++ b/string/test-strcasestr.c @@ -97,7 +97,7 @@ do_test (size_t align1, size_t align2, size_t len1, size_t len2, char *s1 = (char *) (buf1 + align1); char *s2 = (char *) (buf2 + align2); - static const char d[] = "1234567890abcdef"; + static const char d[] = "1234567890abcxyz"; #define dl (sizeof (d) - 1) char *ss2 = s2; for (size_t l = len2; l > 0; l = l > dl ? l - dl : 0) diff --git a/sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c index e2b19a3..45d7a55 100644 --- a/sysdeps/x86_64/multiarch/strstr.c +++ b/sysdeps/x86_64/multiarch/strstr.c @@ -174,7 +174,7 @@ __m128i_strloadu_tolower (const unsigned char *p, __m128i rangeuc, __m128i frag = __m128i_strloadu (p); #define UCLOW 0x4040404040404040ULL -#define UCHIGH 0x5a5a5a5a5a5a5a5aULL +#define UCHIGH 0x5b5b5b5b5b5b5b5bULL #define LCQWORD 0x2020202020202020ULL /* Compare if 'Z' > bytes. Inverted way to get a mask for byte <= 'Z'. */ __m128i r2 = _mm_cmpgt_epi8 (_mm_set1_epi64x (UCHIGH), frag); |