HomeFreeBSD

bsdinstall partedit: Replace malloc + sprintf with asprintf

Description

bsdinstall partedit: Replace malloc + sprintf with asprintf

This avoids potential bugs with the length passed to malloc not
matching the string written via sprintf.

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

(cherry picked from commit 51749e05e96eb07134a38984a8c06608b20f07ea)

Details

Provenance
jhbAuthored on Oct 16 2023, 11:25 PM
Reviewer
emaste
Differential Revision
D42238: bsdinstall partedit: Replace malloc + sprintf with asprintf
Parents
rGa78807a2fa0e: bsdinstall partedit: Avoid potential buffer overflow in newfs_command
Branches
Unknown
Tags
Unknown