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
F107153576: D42239.diff
Fri, Jan 10, 10:50 PM
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
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 54016
Build 50906: arc lint + arc unit