This replaces fragile uses of snprintf(). Note that I did not keep
the truncation check for the space separator in the middle of the
drive name since the same check was not applied to the second part, so
the name was truncated anyway. Just truncate the entire result if it
doesn't fit.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 64914 Build 61797: arc lint + arc unit
Event Timeline
usr.sbin/mfiutil/mfi_drive.c | ||
---|---|---|
115 | Using sbuf_trim() here might be useful, but it's probably overly complex to do so. |