[edk2-devel] [PATCH v2 1/6] RedfishClientPkg: fix crash on access to uninialized list variable.
Mike Maslenkin
mike.maslenkin at gmail.com
Tue Aug 29 08:01:07 UTC 2023
Signed-off-by: Mike Maslenkin <mike.maslenkin at gmail.com>
---
RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
index b9c799e07684..a1738de46fdf 100644
--- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
+++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
@@ -97,6 +97,8 @@ RedfishConsumeResourceCommon (
if (BiosCs->Attributes == NULL) {
BiosCs->Attributes = AllocateZeroPool (sizeof (RedfishBios_V1_0_9_Attributes_CS));
ASSERT (BiosCs->Attributes != NULL);
+ // initialize list
+ BiosCs->Attributes->Prop.ForwardLink = &BiosCs->Attributes->Prop;
}
//
--
2.32.0 (Apple Git-132)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108079): https://edk2.groups.io/g/devel/message/108079
Mute This Topic: https://groups.io/mt/101027003/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list