public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "liubov.dmitrieva at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/15674] __memcmp_ssse3 tries to read past the array bounary
Date: Tue, 25 Jun 2013 12:51:00 -0000	[thread overview]
Message-ID: <bug-15674-131-m7fsGSwnud@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15674-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=15674

--- Comment #2 from Liubov Dmitrieva <liubov.dmitrieva at gmail dot com> ---
This patch fixes the issue. Tested on my machines.

diff --git a/sysdeps/x86_64/multiarch/memcmp-ssse3.S
b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
index bdd2ed2..e319df9 100644
--- a/sysdeps/x86_64/multiarch/memcmp-ssse3.S
+++ b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
@@ -1463,10 +1463,8 @@ L(next_24_bytes):
        test    $0x40, %dh
        jnz     L(Byte22)

-       mov     -9(%rdi), %eax
-       and     $0xff, %eax
-       mov     -9(%rsi), %edx
-       and     $0xff, %edx
+       movzbl  -9(%rdi), %eax
+       movzbl  -9(%rsi), %edx
        sub     %edx, %eax
        ret
 # else

-- 
You are receiving this mail because:
You are on the CC list for the bug.


  parent reply	other threads:[~2013-06-25 12:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  0:20 [Bug libc/15674] New: " ronis at google dot com
2013-06-25  0:22 ` [Bug libc/15674] " ronis at google dot com
2013-06-25  1:24 ` ppluzhnikov at google dot com
2013-06-25  5:27 ` aj at suse dot de
2013-06-25 12:51 ` liubov.dmitrieva at gmail dot com [this message]
2013-06-25 13:18   ` Ondřej Bílka
2013-06-25 13:18 ` neleai at seznam dot cz
2013-06-25 13:25 ` liubov.dmitrieva at gmail dot com
2013-06-25 13:26 ` aj at suse dot de
2013-06-26 22:25 ` hjl.tools at gmail dot com
2013-06-27  1:02 ` jsm28 at gcc dot gnu.org
2014-06-16 16:46 ` [Bug libc/15674] __memcmp_ssse3 tries to read past the array boundary fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15674-131-m7fsGSwnud@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).