]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/x86_64/memchr.S: Handle invalid buffer pointers when
authorUlrich Drepper <drepper@redhat.com>
Sat, 9 May 2009 06:40:15 +0000 (06:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 9 May 2009 06:40:15 +0000 (06:40 +0000)
count is zero.

ChangeLog
sysdeps/x86_64/memchr.S

index 8dc74b4a80fccef33a25ff572ef3f8fe2c73a6a9..6926c7e68e07235bc5ba3957f5627dfa2fe67ff2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,15 @@
 2009-05-08  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/x86_64/memchr.S: Handle invalid buffer pointers when
+       count is zero.
+
        * po/da.po: Update from translation team.
 
 2009-05-05  Jakub Jelinek  <jakub@redhat.com>
 
        * io/sys/stat.h (fstatat64): Guard prototype with __USE_LARGEFILE64,
        guard __extern_inline wrapper with __USE_ATFILE instead of __USE_GNU.
-               
+
 2009-05-05  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/sys/personality.h: Add ADDR_COMPAT_LAYOUT
index 09ba6d4f8dab9244d80e74c45b5505ed705765e4..54b7af534c73665921d66602ae6c786ba5b8ff02 100644 (file)
@@ -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