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
F131814306: D39211.id119266.diff
Sat, Oct 11, 9:37 AM
F131814304: D39211.id.diff
Sat, Oct 11, 9:37 AM
F131775817: D39211.id119279.diff
Sat, Oct 11, 1:58 AM
Unknown Object (File)
Fri, Oct 10, 7:17 PM
Unknown Object (File)
Tue, Sep 30, 6:32 AM
Unknown Object (File)
Aug 19 2025, 6:26 AM
Unknown Object (File)
Aug 14 2025, 11:33 PM
Unknown Object (File)
Aug 11 2025, 1:12 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 Not Applicable
Unit
Tests Not Applicable