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)
Sat, Aug 9, 2:34 PM
Unknown Object (File)
Tue, Aug 5, 10:58 PM
Unknown Object (File)
Jun 22 2025, 5:31 AM
Unknown Object (File)
Jun 22 2025, 5:31 AM
Unknown Object (File)
Jun 22 2025, 5:24 AM
Unknown Object (File)
Jun 22 2025, 3:42 AM
Unknown Object (File)
Jun 15 2025, 1:51 PM
Unknown Object (File)
Jun 13 2025, 6:22 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 50524
Build 47415: arc lint + arc unit