diff --git a/ChangeLog b/ChangeLog index a917b6e51e..36cd1e23e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2011-10-13 Andreas Schwab + * sysdeps/x86_64/memrchr.S: Check for zero size. + * string/stratcliff.c: Add memrchr tests. 2011-10-12 Liubov Dmitrieva diff --git a/sysdeps/x86_64/memrchr.S b/sysdeps/x86_64/memrchr.S index 81b7a1c320..70adca379c 100644 --- a/sysdeps/x86_64/memrchr.S +++ b/sysdeps/x86_64/memrchr.S @@ -282,6 +282,9 @@ L(return_null): .p2align 4 L(length_less16_offset0): + test %edx, %edx + jz L(return_null) + mov %dl, %cl pcmpeqb (%rdi), %xmm1