public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Paul" <paul.grimes@amd.com>
To: <devel@edk2.groups.io>
Cc: Qi Zhang <qi1.zhang@intel.com>, Rahul Kumar <rahul1.kumar@intel.com>
Subject: [PATCH v1 2/2] SecurityPkg: OpalPasswordDxe: uninitialized local variable.
Date: Sat, 22 Oct 2022 09:00:10 -0700	[thread overview]
Message-ID: <20221022160010.632-3-paul.grimes@amd.com> (raw)
In-Reply-To: <20221022160010.632-1-paul.grimes@amd.com>

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

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

Cc: Qi Zhang <qi1.zhang@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: Paul Grimes <paul.grimes@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


  parent reply	other threads:[~2022-10-22 16:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-22 16:00 [PATCH v1 0/2] Uninitialized local variable Paul
2022-10-22 16:00 ` [PATCH v1 1/2] MdeModulePkg: BdsDxe: " Paul
2022-10-22 16:00 ` Paul [this message]
2022-10-26 13:45   ` [edk2-devel] [PATCH v1 2/2] SecurityPkg: OpalPasswordDxe: uninitialized " Yao, Jiewen
2022-10-26  1:17 ` 回复: [edk2-devel] [PATCH v1 0/2] Uninitialized " gaoliming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221022160010.632-3-paul.grimes@amd.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox