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
F152912707: D39211.id119266.diff
Sat, Apr 18, 12:00 AM
Unknown Object (File)
Thu, Apr 16, 8:07 PM
Unknown Object (File)
Thu, Apr 16, 11:37 AM
Unknown Object (File)
Tue, Apr 14, 7:51 AM
Unknown Object (File)
Tue, Apr 7, 7:39 PM
Unknown Object (File)
Fri, Apr 3, 4:04 AM
Unknown Object (File)
Mar 13 2026, 4:16 PM
Unknown Object (File)
Mar 12 2026, 7:30 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