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)
Thu, May 21, 1:41 AM
Unknown Object (File)
Tue, May 12, 9:25 AM
Unknown Object (File)
Mon, May 11, 9:55 PM
Unknown Object (File)
Mon, May 11, 9:18 PM
Unknown Object (File)
Fri, May 8, 5:39 AM
Unknown Object (File)
Wed, May 6, 6:46 PM
Unknown Object (File)
Tue, Apr 28, 8:27 PM
Unknown Object (File)
Tue, Apr 28, 8:21 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