[PATCH] add attribute nonstring

Paul Eggert eggert@cs.ucla.edu
Tue Nov 21 05:27:00 GMT 2017


Joseph Myers wrote:
> This patch is OK, with the corresponding change also to
> sysdeps/unix/sysv/linux/s390/bits/utmp.h unless you have reason to believe
> that version of bits/utmp.h doesn't need changing

Are similar changes also needed to bits/utmp.h and to 
sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h? They also define these arrays.

Also, manual/users.texi should document that the relevant arrays are not 
necessarily null-terminated.

Also, what about struct utmpx? It has similarly-named fields, which also appear 
to use strncpy format. This affects sysdeps/unix/sysv/linux/s390/bits/utmpx.h, 
sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h, sysdeps/gnu/bits/utmpx.h, and 
manual/users.texi.



More information about the Libc-alpha mailing list