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
Unknown Object (File)
Wed, Oct 14, 1:49 AM
Unknown Object (File)
Sun, Oct 11, 11:22 AM
Unknown Object (File)
Sun, Oct 4, 12:28 PM
Unknown Object (File)
Fri, Oct 2, 10:38 AM
Unknown Object (File)
Wed, Sep 30, 6:47 PM
Unknown Object (File)
Fri, Sep 18, 8:31 PM
Unknown Object (File)
Sep 16 2026, 11:30 PM
Unknown Object (File)
Sep 10 2026, 11:52 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 64913
Build 61796: arc lint + arc unit