From: Paul Grimes <paul.gri...@amd.com>

In ProcessOpalRequest(), VariableSize is used prior to being
initialized.  This change initializes the variable.

Cc: Qi Zhang <qi1.zh...@intel.com>
Cc: Rahul Kumar <rahul1.ku...@intel.com>
Signed-off-by: Paul Grimes <paul.gri...@amd.com>
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
index f127757ad9f0..d827cea23868 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
@@ -2184,6 +2184,7 @@ ProcessOpalRequest (
 
   DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
 
+  VariableSize = 0;
   if (mOpalRequestVariable == NULL) {
     Status = GetVariable2 (
                OPAL_REQUEST_VARIABLE_NAME,
-- 
2.24.0.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95483): https://edk2.groups.io/g/devel/message/95483
Mute This Topic: https://groups.io/mt/94499443/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to