diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-05-09 06:40:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-05-09 06:40:15 +0000 |
commit | 2221e33e5de0a17eef521b923229b2ede48abaad (patch) | |
tree | a239b0228691358c0595afebd0846d72dd73ad36 /sysdeps/x86_64/memchr.S | |
parent | b5f7c4cae0c21e5a80fa2dfd4bacbf3cdeeca6a6 (diff) | |
download | glibc-2221e33e5de0a17eef521b923229b2ede48abaad.tar glibc-2221e33e5de0a17eef521b923229b2ede48abaad.tar.gz glibc-2221e33e5de0a17eef521b923229b2ede48abaad.tar.bz2 glibc-2221e33e5de0a17eef521b923229b2ede48abaad.zip |
* sysdeps/x86_64/memchr.S: Handle invalid buffer pointers when
count is zero.
Diffstat (limited to 'sysdeps/x86_64/memchr.S')
-rw-r--r-- | sysdeps/x86_64/memchr.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/x86_64/memchr.S b/sysdeps/x86_64/memchr.S index 09ba6d4f8d..54b7af534c 100644 --- a/sysdeps/x86_64/memchr.S +++ b/sysdeps/x86_64/memchr.S @@ -26,7 +26,9 @@ ENTRY (memchr) movq %rdi, %rcx punpcklbw %xmm1, %xmm1 andq $~15, %rdi + testq %rdx, %rdx punpcklbw %xmm1, %xmm1 + jz 3f orl $0xffffffff, %esi movdqa (%rdi), %xmm0 pshufd $0, %xmm1, %xmm1 |