Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: 43e2395c1b130540820957305451340e1fff81e4 https://github.com/tianocore/edk2/commit/43e2395c1b130540820957305451340e1fff81e4 Author: Dun Tan <dun....@intel.com> Date: 2024-07-29 (Mon, 29 Jul 2024)
Changed paths: M MdeModulePkg/Universal/Variable/Pei/Variable.c Log Message: ----------- MdeModulePkg: fix issue caused by uninitialized variable This patch is to fix issue caused by uninitialized local variable in Pei/Variable.c. In the fucntion CalculateHobVariableCacheSize(), the local variable VARIABLE_STORE_INFO StoreInfo is used without initialization. When the uninitialized variable is passed to CalculateAuthVarStorageSize() and GetNextVariablePtr(), the field StoreInfo->FtwLastWriteData might be a uninitialized non-zero value. Then the code execution will access the invalid address StoreInfo->FtwLastWriteData->TargetAddress. This might cause issue. So in this commit, the local variable VARIABLE_STORE_INFO StoreInfo is initialized by a ZeroMem() before use. Signed-off-by: Dun Tan <dun....@intel.com> To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits