1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

login: Add nonstring attributes to struct utmp, struct utmpx [BZ #24899]

Commit 7532837d7b ("The
-Wstringop-truncation option new in GCC 8 detects common misuses")
added __attribute_nonstring__ to bits/utmp.h, but it did not update
the parallel bits/utmpx.h header.  In struct utmp, the nonstring
attribute for ut_id was missing.
This commit is contained in:
Florian Weimer
2019-08-15 16:09:43 +02:00
parent 0d5b291753
commit c2adefbafc
5 changed files with 32 additions and 10 deletions

View File

@ -61,7 +61,8 @@ struct utmp
pid_t ut_pid; /* Process ID of login process. */
char ut_line[UT_LINESIZE]
__attribute_nonstring__; /* Devicename. */
char ut_id[4]; /* Inittab ID. */
char ut_id[4]
__attribute_nonstring__; /* Inittab ID. */
char ut_user[UT_NAMESIZE]
__attribute_nonstring__; /* Username. */
char ut_host[UT_HOSTSIZE]