Vitaly Cheptsov 0e5812812d BaseTools/VfrCompile: Fix memory issues
Using GCC 13.3.0 discovers an out of bounds memory access in VfrCompile
when building DriverSampleDxe. This is also discoverable with ASan.
The issue here is that EFI_IFR_TYPE_VALUE is a flexible type and
when passed by value for string types only the header part is accessible.
Assuming the remainder is zero seems to be ok as gZeroEfiIfrTypeValue
is used as a variable source.

This change also fixes a warning for new[]/delete[] mismatch
discovered by ASan.

Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
2025-04-28 18:18:00 +03:00
..
2025-01-31 05:23:39 +00:00