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)
Sun, Oct 12, 4:01 AM
Unknown Object (File)
Sat, Oct 11, 9:37 AM
Unknown Object (File)
Sat, Oct 11, 9:37 AM
Unknown Object (File)
Sat, Oct 11, 1:58 AM
Unknown Object (File)
Fri, Oct 10, 7:17 PM
Unknown Object (File)
Tue, Sep 30, 6:32 AM
Unknown Object (File)
Aug 19 2025, 6:26 AM
Unknown Object (File)
Aug 14 2025, 11:33 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