This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.23-521-gfea5649


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  fea56491c44623b23675b4440bf4037b855b5ce0 (commit)
      from  e402823ef3852704296cd775c58e4bc633c07f20 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fea56491c44623b23675b4440bf4037b855b5ce0

commit fea56491c44623b23675b4440bf4037b855b5ce0
Author: Andreas Schwab <schwab@suse.de>
Date:   Tue Jun 28 12:54:59 2016 +0200

    Avoid array-bounds warning for strncat on i586 (bug 20260)

diff --git a/ChangeLog b/ChangeLog
index 3da2eca..10dfaa1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-06-29  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #20260]
+	* sysdeps/x86/bits/string.h (__strncat_g) [!__i686__]: Compute the
+	address before the beginning of the string as an integer to avoid
+	array-bounds warning.
+
 2016-06-28  Richard Henderson  <rth@redhat.com>
 
 	* elf/elf.h (EM_BPF): New.
diff --git a/sysdeps/x86/bits/string.h b/sysdeps/x86/bits/string.h
index 8dfce05..805d33f 100644
--- a/sysdeps/x86/bits/string.h
+++ b/sysdeps/x86/bits/string.h
@@ -1089,7 +1089,6 @@ __strncat_g (char *__dest, const char __src[], size_t __n)
      :  "g" (__n), "0" (0), "1" (__tmp), "2" (__src), "3" (0xffffffff)
      : "memory", "cc");
 # else
-  --__tmp;
   __asm__ __volatile__
     ("1:\n\t"
      "cmpb	$0,1(%1)\n\t"
@@ -1108,7 +1107,7 @@ __strncat_g (char *__dest, const char __src[], size_t __n)
      "3:\n\t"
      "movb	$0,(%1)"
      : "=&q" (__dummy), "=&r" (__tmp), "=&r" (__src), "=&r" (__n)
-     : "1" (__tmp), "2" (__src), "3" (__n)
+     : "1" ((unsigned long) __tmp - 1), "2" (__src), "3" (__n)
      : "memory", "cc");
 #endif
   return __dest;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |    7 +++++++
 sysdeps/x86/bits/string.h |    3 +--
 2 files changed, 8 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]