Reviewed-by: Nickle Wang <nick...@nvidia.com>


@abner.ch...@amd.com<mailto:abner.ch...@amd.com>, I am thinking that we may 
need to provide allocation function for CS structure so caller does not need to 
handle linked-list initialization like this one, or other stuff requies 
understanding to CS structure implementation.



Regards,

Nickle



> -----Original Message-----

> From: Mike Maslenkin <mike.maslen...@gmail.com>

> Sent: Tuesday, August 29, 2023 4:01 PM

> To: devel@edk2.groups.io

> Cc: abner.ch...@amd.com; Nickle Wang <nick...@nvidia.com>;

> ig...@ami.com; Mike Maslenkin <mike.maslen...@gmail.com>

> Subject: [PATCH v2 1/6] RedfishClientPkg: fix crash on access to uninialized 
> list

> variable.

>

> External email: Use caution opening links or attachments

>

>

> Signed-off-by: Mike Maslenkin 
> <mike.maslen...@gmail.com<mailto:mike.maslen...@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 (#108105): https://edk2.groups.io/g/devel/message/108105
Mute This Topic: https://groups.io/mt/101027003/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to