From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web10.137.1666456388676362086 for ; Sat, 22 Oct 2022 09:33:09 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=WYnz1qRZ; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.236.41, mailfrom: paul.grimes@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AXxmIxHLS7uEeYtEtSv0hjiN9Y6JOWR5bA8PpPV3zhdetX1Frz7Z/XXvdxViwTFBud5B7jRaUogKPjkz6U0w+NYMhItrG9YXPz88KB6bSgY0pyrhB7nhlBYx1VImpGKN0cjXKrwQrcwX/p6mNp8QPPQs9+c3xvfZN9P/1UJ0H0i9ETz1w1L2fwcGDkDNGWk3lx65bOR/Zr2tu0nHK7qtTHBIv9rl4HBn6/91ov52mRPteXY+IbOdQppkzuJGpMMgw+i4j9V/RkB4PpxtawGNsuBzxkyKKxP+z7VSUeXK89vvx5Bg7JNaeo2g2R+KEAvugsmpswuH4nVkqadPQhPBrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YOYmNkHy2T23Ly+PMRULQWemRdUht0cBUcMCfAlTPKk=; b=TSDyeSbSKNC0OpUcHgjF0J68Ik/ZocKskPnLq/E5aiOmd673n9ACRxOFmd9ZFL7dV0Fmiw1Cg+rXcK/1YbUZh5KcSxPdX4yC8WzFf2mu2RV+n8dOA0NogDCwSxeRe0bSlILKar0/TwYWl/SDgDGmo7f7DiQCl7CzqCfZKfgp27jJrdTZZpEarshsjqtUdOCdtMK+NSL9+JA9NBOjxbP+P+T/X7hnhDyl7Suf6pr+ETQEZUNzPpp5mprqnQZEeVeebW8bpaIQ2xWujTq+YvojYHEICzhKToepc+Fq2hqgUKyHGKjpQs+yTxt5XY/LjBc10w0rUylBueiAUoVoJWSV1A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YOYmNkHy2T23Ly+PMRULQWemRdUht0cBUcMCfAlTPKk=; b=WYnz1qRZTg8vIp0IX6ArN75fYAevaRiVYLTs1Y1XAZgWYWShSZ8w5Qj/SvQ8BrSMhhrJsKkV3NML/fhvQz6Zuybh3uuhTiRefLw43cxudL08XCAr8BPQxWOp/qwWBgz11A3k7fsiSnlnMW+TDiZbLVUd0HP0O5j3Fm7fx6ex9hE= Received: from BN9PR03CA0102.namprd03.prod.outlook.com (2603:10b6:408:fd::17) by BY5PR12MB4902.namprd12.prod.outlook.com (2603:10b6:a03:1dd::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Sat, 22 Oct 2022 16:00:53 +0000 Received: from BN8NAM11FT061.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fd:cafe::1) by BN9PR03CA0102.outlook.office365.com (2603:10b6:408:fd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23 via Frontend Transport; Sat, 22 Oct 2022 16:00:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT061.mail.protection.outlook.com (10.13.177.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5746.16 via Frontend Transport; Sat, 22 Oct 2022 16:00:52 +0000 Received: from AUS-LX-PAGRIMES.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 22 Oct 2022 11:00:50 -0500 From: "Paul" To: CC: Qi Zhang , Rahul Kumar Subject: [PATCH v1 2/2] SecurityPkg: OpalPasswordDxe: uninitialized local variable. Date: Sat, 22 Oct 2022 09:00:10 -0700 Message-ID: <20221022160010.632-3-paul.grimes@amd.com> X-Mailer: git-send-email 2.24.0.windows.2 In-Reply-To: <20221022160010.632-1-paul.grimes@amd.com> References: <20221022160010.632-1-paul.grimes@amd.com> MIME-Version: 1.0 Return-Path: Paul.Grimes@amd.com X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT061:EE_|BY5PR12MB4902:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a420a70-8c37-492d-0838-08dab446989c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qcp9AmVwJz5L2xgeQcOF4EuX0PmbTQuKM9gqaLtXRAenW4E8pLd2TQ2NS8Zr+7qPRjKhtsy3zXjrdNkmmb4san0qDj4VhTnWpgbAoIXBqDdaRQ+pKS5qorrpUJsbvyE4bzMuC1Us5x6HXH8bot768tDnrvXx8GwMnquM7X70YCS8BsK/9WGDlTnADuDGs8GDJT/wqAWqgV9CkNvsjYL+g0q50YsnmIgqeygSnsFxktXmjWcUXxl0h8bxRhPD2s/PGmPJobc32tp95tzNwHdRyJVikUAph0UWB4aRtZVQMQez+bCJdKwtWgJG8NLAF2nuFabDDwCzGQym5VX+973tBZVQVTQ1k5smBxz42wYbdpB5D4WgymJEaf9Eee3BRs0ICNP/usw8pLJ1l4+yOyEWpe2SXmKnkzuy6EgaqaBhp5EiBpvsxfnfZbP2p58fzmy5XN8MWaZ2LKJ69pMhk5WWndyOcwkzmItOdhjQMXw30eRkkf+Kh7vqZtgXYkShzijwW3q4zj2c+NZhFVEmdOS6yeEr5w1mQmV4iT5dc59lCJPrk2A9o7EzVa3/16zpHJBDzfxvBjoH1vfFJgB/6QZFtA8mR5IJnH0hrDl4uKp2HO8YMAWwr4fcnRjgBnnCDG9MKJvGO/UM5hYYcmQZDL8+mHskiwoZJqId5Dfm0MmDI3a1ArT75uHsL2NESBfThMcwhdcaf9YAQTv3RE9y0TcHviSlj/wDQQayAJMxafHic+7AKMy9z2vSX+Py2KHFrKllPgJcfgHyO9Mjsa6s5pOEnAeyvIZOKKHVWewjMecd190= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(376002)(346002)(396003)(136003)(39850400004)(451199015)(46966006)(40470700004)(36840700001)(15650500001)(4326008)(4744005)(6916009)(36756003)(54906003)(316002)(70586007)(41300700001)(6666004)(70206006)(2876002)(8936002)(36860700001)(7696005)(5660300002)(81166007)(82740400003)(186003)(1076003)(426003)(2616005)(8676002)(82310400005)(2906002)(356005)(40480700001)(16526019)(336012)(47076005)(86362001)(478600001)(83380400001)(40460700003)(26005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 16:00:52.6950 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a420a70-8c37-492d-0838-08dab446989c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT061.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4902 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Paul Grimes In ProcessOpalRequest(), VariableSize is used prior to being initialized. This change initializes the variable. Cc: Qi Zhang Cc: Rahul Kumar Signed-off-by: Paul Grimes --- SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/T= cg/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 ( =20 DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); =20 + VariableSize =3D 0; if (mOpalRequestVariable =3D=3D NULL) { Status =3D GetVariable2 ( OPAL_REQUEST_VARIABLE_NAME, --=20 2.24.0.windows.2