* [edk2-devel] [edk2-redfish-client][PATCH 2/3] RedfishClientPkg/RedfishConfigLangMapDxe: uninitialized variable issue
@ 2023-10-31 7:44 Nickle Wang via groups.io
2023-11-01 13:34 ` Chang, Abner via groups.io
0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang via groups.io @ 2023-10-31 7:44 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Igor Kulchytskyy, Nick Ramirez
-RedfishConfigLangMapDxe relies on variable arch protocol.
-Status variable is not initialized.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
---
.../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf | 4 ++--
.../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf
index 821f0552..42d9daf2 100644
--- a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf
+++ b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf
@@ -1,7 +1,7 @@
## @file
#
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
-# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -45,4 +45,4 @@
gEfiRedfishClientVariableGuid ## CONSUMED ##
[Depex]
- TRUE
+ gEfiVariableArchProtocolGuid
diff --git a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
index 6a72afed..97f29549 100644
--- a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
+++ b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
@@ -1,7 +1,7 @@
/** @file
(C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
- Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -756,6 +756,7 @@ RedfishConfigLangMapDriverEntryPoint (
InitializeListHead (&mRedfishConfigLangMapPrivate->ConfigLangList.Listheader);
mRedfishConfigLangMapPrivate->VariableName = AllocateCopyPool (StrSize (CONFIG_LANG_MAP_VARIABLE_NAME), CONFIG_LANG_MAP_VARIABLE_NAME);
if (mRedfishConfigLangMapPrivate->VariableName == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
goto ON_ERROR;
}
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110381): https://edk2.groups.io/g/devel/message/110381
Mute This Topic: https://groups.io/mt/102293048/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [edk2-devel] [edk2-redfish-client][PATCH 2/3] RedfishClientPkg/RedfishConfigLangMapDxe: uninitialized variable issue
2023-10-31 7:44 [edk2-devel] [edk2-redfish-client][PATCH 2/3] RedfishClientPkg/RedfishConfigLangMapDxe: uninitialized variable issue Nickle Wang via groups.io
@ 2023-11-01 13:34 ` Chang, Abner via groups.io
0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner via groups.io @ 2023-11-01 13:34 UTC (permalink / raw)
To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy, Nick Ramirez
[AMD Official Use Only - General]
Reviewed-by: Abner Chang <abner.chang@amd.com>
> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Tuesday, October 31, 2023 3:45 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [edk2-redfish-client][PATCH 2/3]
> RedfishClientPkg/RedfishConfigLangMapDxe: uninitialized variable issue
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> -RedfishConfigLangMapDxe relies on variable arch protocol.
> -Status variable is not initialized.
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Nick Ramirez <nramirez@nvidia.com>
> ---
> .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.inf | 4 ++--
> .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c | 3 ++-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git
> a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.in
> f
> b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.in
> f
> index 821f0552..42d9daf2 100644
> ---
> a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.in
> f
> +++
> b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.in
> f
> @@ -1,7 +1,7 @@
> ## @file
> #
> # (C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
> -# Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
> +# Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
> #
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> @@ -45,4 +45,4 @@
> gEfiRedfishClientVariableGuid ## CONSUMED ##
>
> [Depex]
> - TRUE
> + gEfiVariableArchProtocolGuid
> diff --git
> a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
> b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
> index 6a72afed..97f29549 100644
> ---
> a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
> +++
> b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c
> @@ -1,7 +1,7 @@
> /** @file
>
> (C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
> - Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
> + Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -756,6 +756,7 @@ RedfishConfigLangMapDriverEntryPoint (
> InitializeListHead (&mRedfishConfigLangMapPrivate-
> >ConfigLangList.Listheader);
> mRedfishConfigLangMapPrivate->VariableName = AllocateCopyPool (StrSize
> (CONFIG_LANG_MAP_VARIABLE_NAME),
> CONFIG_LANG_MAP_VARIABLE_NAME);
> if (mRedfishConfigLangMapPrivate->VariableName == NULL) {
> + Status = EFI_OUT_OF_RESOURCES;
> goto ON_ERROR;
> }
>
> --
> 2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#110482): https://edk2.groups.io/g/devel/message/110482
Mute This Topic: https://groups.io/mt/102293048/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-01 13:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-31 7:44 [edk2-devel] [edk2-redfish-client][PATCH 2/3] RedfishClientPkg/RedfishConfigLangMapDxe: uninitialized variable issue Nickle Wang via groups.io
2023-11-01 13:34 ` Chang, Abner via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox