From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10711 invoked by alias); 25 Jun 2013 12:51:06 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 10644 invoked by uid 48); 25 Jun 2013 12:51:02 -0000 From: "liubov.dmitrieva at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.18 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: liubov.dmitrieva at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: liubov.dmitrieva at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00207.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=15674 --- Comment #2 from Liubov Dmitrieva --- 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.