Page MenuHomeFreeBSD

mfiutil: Handle truncation in mfi_next_learn_time
ClosedPublic

Authored by jhb on Jun 16 2025, 5:52 PM.
Tags
None
Referenced Files
F132385130: D50882.diff
Thu, Oct 16, 11:05 AM
Unknown Object (File)
Tue, Oct 14, 11:53 AM
Unknown Object (File)
Tue, Oct 14, 11:53 AM
Unknown Object (File)
Tue, Oct 14, 11:53 AM
Unknown Object (File)
Mon, Oct 13, 9:48 PM
Unknown Object (File)
Sep 6 2025, 5:01 AM
Unknown Object (File)
Aug 29 2025, 9:26 PM
Unknown Object (File)
Aug 23 2025, 10:32 PM
Subscribers
None

Details

Summary

Only trim the trailing newline if the output from ctime() was not
truncated. To simplify the code, use strlcpy() instead of snprintf()
since strlcpy() can't fail with a negative size (and the previous code
probably didn't handle those errors properly given the int -> size_t
conversion).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable