forked from pool/glibc
Andreas Schwab
e794ddb00b
- strncat-avoid-array-bounds-warning.patch: Avoid array-bounds warning for stncat on i586 (BZ #20260) - Update glibc.keyring - Unset MALLOC_CHECK_ during testsuite run - nsswitch.conf: Add fallback to files for passwd and group to prepare for libnsl removal. - nis-initgroups-status.patch: Return proper status from _nss_nis_initgroups_dyn (bsc#984269, BZ #20262) - robust-mutex-deadlock.patch: Fix generic __lll_robust_timedlock_wait to check for timeout (bsc#985170, BZ #20263) OBS-URL: https://build.opensuse.org/request/show/407107 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=442
32 lines
1015 B
Diff
32 lines
1015 B
Diff
Subject: [PATCH] Avoid array-bounds warning for strncat on i586
|
|
|
|
[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.
|
|
|
|
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;
|
|
--
|
|
2.9.0
|
|
|