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)
Fri, Nov 28, 2:02 PM
Unknown Object (File)
Tue, Nov 25, 11:08 PM
Unknown Object (File)
Nov 12 2025, 5:35 AM
Unknown Object (File)
Nov 11 2025, 5:10 AM
Unknown Object (File)
Nov 11 2025, 5:10 AM
Unknown Object (File)
Nov 11 2025, 5:10 AM
Unknown Object (File)
Nov 1 2025, 6:17 PM
Unknown Object (File)
Oct 29 2025, 11:32 AM
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