Page MenuHomeFreeBSD

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

Authored by jhb on Mar 22 2023, 6:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 22 2024, 6:41 AM
Unknown Object (File)
May 22 2024, 4:12 AM
Unknown Object (File)
May 19 2024, 12:48 PM
Unknown Object (File)
May 19 2024, 12:47 PM
Unknown Object (File)
May 5 2024, 4:38 PM
Unknown Object (File)
May 3 2024, 3:04 PM
Unknown Object (File)
Apr 5 2024, 7:52 PM
Unknown Object (File)
Apr 5 2024, 7:52 PM
Subscribers

Details

Summary

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.

Reported by: GCC -Wstringop-overread

Diff Detail

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