mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(print_uptime) [defined BOOT_MSG]:
Don't assume ut_line is null-terminated.
This commit is contained in:
1 parent
d3d39f9a3e
commit
a6411b5d54
1 file changed
+1
-1
+1
-1
@@ -115,7 +115,7 @@ print_uptime (int n, const STRUCT_UTMP *this)
|
||||
# if HAVE_PROC_UPTIME
|
||||
if (uptime == 0)
|
||||
# endif /* HAVE_PROC_UPTIME */
|
||||
if (STREQ (this->ut_line, BOOT_MSG))
|
||||
if (strncmp (this->ut_line, BOOT_MSG, sizeof this->ut_line) == 0)
|
||||
boot_time = UT_TIME_MEMBER (this);
|
||||
#endif /* BOOT_MSG */
|
||||
++this;
|
||||
|
||||
Reference in new issue
Block a user