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, Oct 18, 7:46 AM
Unknown Object (File)
Sep 16 2024, 6:59 PM
Unknown Object (File)
Sep 16 2024, 3:50 PM
Unknown Object (File)
Sep 15 2024, 9:17 PM
Unknown Object (File)
Sep 9 2024, 8:44 AM
Unknown Object (File)
Sep 6 2024, 1:08 AM
Unknown Object (File)
Jul 27 2024, 12:32 AM
Unknown Object (File)
Jun 30 2024, 9:47 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