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 Not Applicable - Unit
Tests Not Applicable
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. |