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
F163374519: D50882.id157118.diff
Wed, Jul 22, 3:28 PM
Unknown Object (File)
Tue, Jul 21, 12:33 PM
Unknown Object (File)
Mon, Jul 20, 3:06 AM
Unknown Object (File)
Sun, Jul 12, 9:55 PM
Unknown Object (File)
Sat, Jul 4, 7:08 AM
Unknown Object (File)
Fri, Jul 3, 10:33 PM
Unknown Object (File)
Fri, Jul 3, 2:40 PM
Unknown Object (File)
Fri, Jun 26, 10:59 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