mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 14:20:13 +00:00
e37ec9c813
The -Wstringop-truncation option new in GCC 8 detects common misuses
of the strncat and strncpy function that may result in truncating
the copied string before the terminating NUL. To avoid false positive
warnings for correct code that intentionally creates sequences of
characters that aren't guaranteed to be NUL-terminated, arrays that
are intended to store such sequences should be decorated with a new
nonstring attribute. This change add this attribute to Glibc and
uses it to suppress such false positives.
ChangeLog:
* misc/sys/cdefs.h (__attribute_nonstring__): New macro.
* sysdeps/gnu/bits/utmp.h (struct utmp): Use it.
* sysdeps/unix/sysv/linux/s390/bits/utmp.h (struct utmp): Same.
(cherry picked from commit
|
||
---|---|---|
.. | ||
bits | ||
net | ||
netinet | ||
sys | ||
configure | ||
configure.ac | ||
errlist-compat.awk | ||
errlist.awk | ||
errlist.c | ||
getutmp.c | ||
getutmpx.c | ||
glob64.c | ||
globfree64.c | ||
ifaddrs.c | ||
ldsodefs.h | ||
Makefile | ||
rt-unwind-resume.c | ||
siglist.c | ||
unwind-resume.c | ||
updwtmp.c | ||
utmp_file.c | ||
utmpx.h |