mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-01 05:03:55 +00:00
To merge the multiboot bootargs within sbl_init_vm_boot_info(), buffer overflow could happen when it doesn't provide correct 'dmax' argument to strncpy_s(). Also, currently it doesn't check the availability of the dest buffer before overwriting '\0' with a whitespace, which theoretically the dest string could end up with no null terminator within it's array boundary. This patch also creates a separate function to merge the cmdline strings, because after the above fixes some lines in sbl_init_vm_boot_info() function could have up to 7 tabs in front of the first character, which looks messy and sbl_init_vm_boot_info() is getting too complicated. Tracked-On: #2806 Signed-off-by: Zide Chen <zide.chen@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> |
||
---|---|---|
.. | ||
include | ||
sbl | ||
uefi | ||
acpi.c | ||
dmar_parse.c | ||
reloc.c |