HomeFreeBSD

bsdinstall partedit: Use asprintf to build wrapper command for newfs

Description

bsdinstall partedit: Use asprintf to build wrapper command for newfs

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.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D42239

(cherry picked from commit a8676bf367b099dcc97ff61031cbf4ceb5e37899)

Details

Provenance
jhbAuthored on Oct 16 2023, 11:25 PM
Reviewer
emaste
Differential Revision
D42239: bsdinstall partedit: Use asprintf to build wrapper command for newfs
Parents
rGbb049096be78: bsdinstall partedit: Replace malloc + sprintf with asprintf
Branches
Unknown
Tags
Unknown