diff options
| author | Mike Beaton <mjsbeaton@gmail.com> | 2025-11-22 01:23:52 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-12-03 15:29:51 +0300 |
| commit | 618868512e7ac0457d052fc73f670bfede15b657 (patch) | |
| tree | ee63952b041ba2b5ab4684fd64bb4853eae9cc63 /MdeModulePkg/Library/PiDxeS3BootScriptLib | |
| parent | 12751d48e215de110a245151f76d3deff39bfe70 (diff) | |
| download | edk2-618868512e7ac0457d052fc73f670bfede15b657.tar.xz | |
BaseTools/VfrCompile: Prevent uninitialized memory access
When traversing through the field definition of a nested type, such
as "MY_EFI_BITS_VARSTORE_DATA.BitsData.NestBitCheckbox", in method
CVfrVarDataTypeDB::GetDataFieldInfo, the mBitWidth member of the
parent (e.g. BitsData) of a bitfield is accessed, even though it
is not itself a bit field and thus its mBitWidth has never been
initialised.
This is not necessary, the Size and Type of each parent object
were being calculated then overwritten by the next lower object,
so we can just avoid calculating these until the final one which
we actually need.
This behaviour was caught by clang MSan.
Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
Diffstat (limited to 'MdeModulePkg/Library/PiDxeS3BootScriptLib')
0 files changed, 0 insertions, 0 deletions
