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
F172409210: D39211.diff
Fri, Sep 18, 6:58 AM
Unknown Object (File)
Thu, Sep 10, 9:13 PM
Unknown Object (File)
Thu, Sep 10, 9:13 PM
Unknown Object (File)
Sat, Sep 5, 2:16 PM
Unknown Object (File)
Sat, Sep 5, 10:00 AM
Unknown Object (File)
Sat, Sep 5, 6:43 AM
Unknown Object (File)
Sat, Sep 5, 5:47 AM
Unknown Object (File)
Sat, Sep 5, 3:02 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 Not Applicable
Unit
Tests Not Applicable