From nobody Mon Feb 9 19:52:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112660+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112660+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1702947643; cv=none; d=zohomail.com; s=zohoarc; b=ct5URqEUujdUVA0Qxs7mjK3nCaSPzaiWpnxaHm8yFMM2Z3Fk/J9gG7S32T59hzm5E0umZx6QrvLaMyKfZXvVqTYo29q8PMzMOT5hfw7mk1LtBxHMWHG3tLQ6jtJv1wIBNH/DoJVHh5U7AXR29qPkF8YoUScw4ZLGQ6wAGKVCJiA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702947643; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=X+5gwl0JE8dInCXyyTzdxRqguxIGLY20vkDsEYlXTZY=; b=IrpXgag+p7oAsY5UK3dYUNMBI7xKVNDyvsLj51V4lcwxtpirb3aTer9S0NZH/2S/+S4mfU3wZJ563qki9+7xFI1jz4PqIsY6+bNNz0HpGq1xPTrHA8f1pDof4RQAxjfGS2oFXgPurhSXoQiYxedR5G6uQlVPsqN7NlwRX5vvwGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112660+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1702947643718184.6715434602263; Mon, 18 Dec 2023 17:00:43 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=m/69uf/uNUBZSwYXC8E+mPPa9XrPlrjokeJTBFZnkxM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1702947643; v=1; b=wf3SZvmOFHsOrkimwvldSbIJouIbO/8Q0ST2ewYxeagPm9uoDGv+OwZdbuADCMm0hiOdB4WZ qKwZ3f/dSvpHCJXfZ7RdUb7CsLu+TtT1xnzYQu+iiiwtG0tfzQ8HH7ItZ9+QkDr3GTjNDbYSBmg MOvB8NSDGjy1ptrn1lj69HUA= X-Received: by 127.0.0.2 with SMTP id huJHYY1788612xJemIyI3oWv; Mon, 18 Dec 2023 17:00:43 -0800 X-Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mx.groups.io with SMTP id smtpd.web11.404.1702947642565486028 for ; Mon, 18 Dec 2023 17:00:42 -0800 X-Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2cb21afa6c1so53322271fa.0 for ; Mon, 18 Dec 2023 17:00:42 -0800 (PST) X-Gm-Message-State: WmaKcLh3VmJGZv7aKKEHwsJ9x1787277AA= X-Google-Smtp-Source: AGHT+IEG3heBfswA1BDQolXjUIMLZJCEycXpTAtOtu9b9cdX051sr2dYcijnCLhlteuLxVzobWMhNQ== X-Received: by 2002:a2e:808d:0:b0:2cc:575b:db55 with SMTP id i13-20020a2e808d000000b002cc575bdb55mr2478632ljg.65.1702947640584; Mon, 18 Dec 2023 17:00:40 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id i2-20020a2e8082000000b002cc5c149dd3sm1019032ljg.120.2023.12.18.17.00.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Dec 2023 17:00:40 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [edk2-redfish-client][PATCH v2 3/3] RedfishClientPkg: fix access to unitialized variable. Date: Tue, 19 Dec 2023 04:00:23 +0300 Message-Id: <20231219010023.56603-4-mike.maslenkin@gmail.com> In-Reply-To: <20231219010023.56603-1-mike.maslenkin@gmail.com> References: <20231219010023.56603-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1702947645216100011 Content-Type: text/plain; charset="utf-8" It is possible that at the time of accessing to AsciiLocation pointer the memory is not allocated. Also gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) emits a warning for this case: RedfishFeatureUtilityLib.c:1889:37: error: 'AsciiLocation' may be used unin= itialized in this function [-Werror=3Dmaybe-uninitialized] *Location =3D StrAsciiToUnicode (AsciiLocation); Cc: Abner Chang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Nickle Wang Reviewed-by: Abner Chang --- .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatu= reUtilityLib.c b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishF= eatureUtilityLib.c index 0f0b050d7eba..01c054ae3b70 100644 --- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtili= tyLib.c +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtili= tyLib.c @@ -1856,7 +1856,8 @@ GetEtagAndLocation ( } =20 if (Location !=3D NULL) { - *Location =3D NULL; + *Location =3D NULL; + AsciiLocation =3D NULL; =20 if (*(Response->StatusCode) =3D=3D HTTP_STATUS_200_OK) { Header =3D HttpFindHeader (Response->HeaderCount, Response->Headers,= HTTP_HEADER_LOCATION); --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112660): https://edk2.groups.io/g/devel/message/112660 Mute This Topic: https://groups.io/mt/103255138/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-