mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 02:03:35 +08:00
Avoid array-bounds warning for strncat on i586 (bug 20260)
This commit is contained in:
parent
e402823ef3
commit
fea56491c4
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user