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
Paths
| Differential D39211 Authored by jhb on Mar 22 2023, 6:01 PM.
Tags None Referenced Files
Details Summary It is illegal (UB?) to pass a shorter array to a function argument Reported by: GCC -Wstringop-overread
Diff Detail
Event TimelineHerald added a reviewer: bhyve. · View Herald TranscriptMar 22 2023, 6:01 PM2023-03-22 18:01:37 (UTC+0) Harbormaster completed remote builds in B50524: Diff 119266.Mar 22 2023, 6:01 PM2023-03-22 18:01:38 (UTC+0) This revision is now accepted and ready to land.Mar 22 2023, 6:31 PM2023-03-22 18:31:24 (UTC+0) Closed by commit rG61482760a0ca: bhyve: Accept a variable-length string name for qemu_fwcfg_add_file. (authored by jhb). · Explain WhyMar 22 2023, 7:36 PM2023-03-22 19:36:31 (UTC+0) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 119266 usr.sbin/bhyve/qemu_fwcfg.h
usr.sbin/bhyve/qemu_fwcfg.c
|
Again, pls. revert, as we have no permission for this change from UCAM.