who: fix only-theoretical overflow
commit9cbda6e1f8fdd4d7ffae26edcabceb239ed14ece
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jul 2023 18:21:25 +0000 (31 11:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jul 2023 18:21:43 +0000 (31 11:21 -0700)
treeb26eba0d1e68789b6eda93a2a0fe9b9567ab1c0e
parent779f34e180fdcabddb24acc2829410ce8ed50fd1
who: fix only-theoretical overflow

Change stzncpy’s implementation to match its comment, in the case
where SRC + LEN would overflow.  This case never happens in coreutils.
* src/system.h (stzncpy): Work even if SRC + LEN would overflow.
src/system.h