HomeFreeBSD

bhyve: Accept a variable-length string name for qemu_fwcfg_add_file.

Description

bhyve: Accept a variable-length string name for qemu_fwcfg_add_file.

It is illegal (UB?) to pass a shorter array to a function argument
that takes a fixed-length array. Do a runtime check for names that
are too long via strlen() instead.

Reviewed by: markj
Reported by: GCC -Wstringop-overread
Differential Revision: https://reviews.freebsd.org/D39211

Details

Provenance
jhbAuthored on Mar 22 2023, 7:34 PM
Reviewer
markj
Differential Revision
D39211: bhyve: Accept a variable-length string name for qemu_fwcfg_add_file.
Parents
rG48c519be0e80: libpfctl: Don't pass stack garbage to free.
Branches
Unknown
Tags
Unknown