Page MenuHomeFreeBSD

bsdinstall partedit: Use asprintf to build wrapper command for newfs
ClosedPublic

Authored by jhb on Oct 16 2023, 10:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 5 2024, 3:35 AM
Unknown Object (File)
Nov 23 2024, 3:59 PM
Unknown Object (File)
Oct 17 2024, 10:45 AM
Unknown Object (File)
Oct 7 2024, 12:17 AM
Unknown Object (File)
Oct 2 2024, 5:56 AM
Unknown Object (File)
Sep 27 2024, 10:35 PM
Unknown Object (File)
Sep 25 2024, 11:12 AM
Unknown Object (File)
Sep 22 2024, 9:13 AM
Subscribers

Details

Summary

Don't abuse the message[] static buffer used elsewhere for error
messages to generate the command that actually newfs's each
filesystem. Use asprintf to a more aptly-named 'char *command'
variable to construct the string instead. This avoids potential bugs
from truncation of the command string.

Diff Detail

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