From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B6E40AC08BA for ; Fri, 15 Dec 2023 01:24:14 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=hm6YDyizRH0WYuqSrpdlo3kX0CHxqp+C9kyL71YeK50=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1702603453; v=1; b=mgSy0u0j1kmxCQ2Gzft3jGQo1HsKcYmuxtJ57UODdTDChy4VS0m2GvvaWKz0ekJuKWgTvA5B /IFFCB0QjUw3GCY+WHvzH61aBhB1FOvYEyWfoEzkUunxTSsJmTfNRT0uCGi8VCzgxdNjTGAhTn4 CZoh0rIxmytX4823wrPk4Pmg= X-Received: by 127.0.0.2 with SMTP id 5yS7YY7687511xZxnSlKIirb; Thu, 14 Dec 2023 17:24:13 -0800 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.48]) by mx.groups.io with SMTP id smtpd.web11.49679.1702603452633587066 for ; Thu, 14 Dec 2023 17:24:12 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mo2+EYHRRhbRoyVtfp8/zybJGZSVCzwmH8CdyIfJMG8zB9m7fKO8e9gUGVA+Q1od730Z5zS+PnAa6lAyH0hnqyS51v3s48cYFLdyrdfijEl9ZF7dgfbMqywmJ9uVqlLKP94dysk82zfNurY5S9c6jn2zYWL7k9urPo23RCYimgeCC5/hksmhTuJusqcWkXweGAfAxNcsKxV1/0sBP9Y1lFQRkVdYRBkzTx5Up3J3U7ZAHDWaUrAHybOTfM2VRTy+T4gW42lkauUmQbq3cJIKnXIOkOMVt+78XoeLX6A2GqJK+ZMQ0l5jkpaCUU0TMk/FfJZp7ca3YTMnQGCafrO6IA== 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=RZWeU8CQtkw8BtmXb1Yu4NB9sk3uANlkgbX3vZj71n8=; b=W3zbXgTvmopF1MSIZ9DtwaWRdlhljpm1ngoQkPYRFMa8vzRcO4NqQkcpw9IcsYyemcxBW38BjU0U9kkdxzbCWx/JdNJ3DZGjRMkX1dNtPGuK9UvUF0mS8Tn7VibWxJw8QW1XSBm0kWVNiQejVdNH3UJQ0fqnCTlpvNXmidWUOMoUlXXgknRZyKGq+Zh53yRKxz8+P14l/71k/o8l9EpeynQB7I1UQK1bsWj/ctRZNP+4p8UF7zJo22FQbLJO1/5VC34dp7lAtYLYBG8u3qEkLbRRFggFgkQesvZSSyCN/cXBxeo2iP5Y/0RqCJ1kJt4J7PCi4950ITY5zeowaeWM4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by DM4PR12MB8559.namprd12.prod.outlook.com (2603:10b6:8:17d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Fri, 15 Dec 2023 01:24:10 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::a78e:602e:415c:4cb4]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::a78e:602e:415c:4cb4%3]) with mapi id 15.20.7091.028; Fri, 15 Dec 2023 01:24:10 +0000 From: "Nickle Wang via groups.io" To: Mike Maslenkin , "devel@edk2.groups.io" CC: "abner.chang@amd.com" , "igork@ami.com" Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH 3/4] RedfishClientPkg: fix access to unitialized variable. Thread-Topic: [edk2-redfish-client][PATCH 3/4] RedfishClientPkg: fix access to unitialized variable. Thread-Index: AQHaLupDp+hbRhOVK0CvfCVearcKlrCpjOMw Date: Fri, 15 Dec 2023 01:24:10 +0000 Message-ID: References: <20231215000400.5311-1-mike.maslenkin@gmail.com> <20231215000400.5311-4-mike.maslenkin@gmail.com> In-Reply-To: <20231215000400.5311-4-mike.maslenkin@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|DM4PR12MB8559:EE_ x-ms-office365-filtering-correlation-id: e2b52474-0164-4b6e-785c-08dbfd0c8a14 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: 8so/lba4qitEo3bbS0GXP8XBxIvZuucSYX5IUclFOwf1FDTOylDqi9PcBsLy0fPXT3kBLn8LILh02WxbBxhE2NsJIS5t6k4t2QJx5Ftt9SnaBd3muBokhhbnXye3HnTQWlvcyFHXFrjgBYabnniXJydWqpvvhNVr6V3FBMCZbvB9MihV0oxY6Xa54bMj6kSB7+N2hm+5JMQsILStWYiDpbwzsJPOiQ3+A3I9GQfwcYxS++oNBFa19x0oeCmvH17nmIwDWi84z61SmTuenJFkqdC5rpc9XRqlwJ0QYtuF4q9KIXh/OOF91Xkii+VlawTVlvuEXr5JXtvEtkkOXWRApLgUsDbfJkOpTRbOeJw68XYIrTLDl7vIot9piduD7MzShSpWiexTTmjndnPTL+L0a+S3+0+c1It76+Ee1/ywxAnKC3YMCSe5QGd9dTRBZuWPyvT1QYb76pSR2VOFxQaH+sgjrYdCAi+yKQ1U28/W4ZslVZX3iBLSLvMjP08Ukai7OJ7Vzz6Lxh/CCPaDpCBioUO3JaTIP3481Bb777oKjo8g2/E6yeu8kMSJ7NTSUhV5ZMQxnBZON/Z4SXe1Y/6Y1ox9tu2FrTD5L48AaNEnXmqO2tXhbnedhvjfMd1m6vGjfkJlg+NxvcjOGcPSdMJ8ADpUBFglEoYGrx9xhkv9EF0= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wD2HaAoQxn1KVPt9tOcl5fjAAa72zzTCIdIuEI3Olj5aZZxuZoHidm+PVhsk?= =?us-ascii?Q?4fpVL0f5crFvooHQ4vdECBRZQ3Yud03NbhmDRZPhc8aupvaRan9PtyTfI1Tv?= =?us-ascii?Q?Sw0ukh69NDNZf92FPLDnqarjJU1srmQ8MVe34T5zul+qrkud3ut0a8Va4OU7?= =?us-ascii?Q?+pXK6MGRceVoPBbfxxX5xgUledDhQUdnQafES4Y45dgBbigAjEWo/26WKMtz?= =?us-ascii?Q?Ddpv9wc2vZZXxDdqdB37VwEQIogvG5OvABPh36iqWvz2TTHeZ0gKfF/c+1XT?= =?us-ascii?Q?VGZqTcgY0wscbmjSlwu3Ik356iN5yXwB7CxACOM/9ivkO/1dZKH53z2r6xV0?= =?us-ascii?Q?qiyB/RjMmykftR/p0tkUjjAdbklyRT6KIgVSl7DassNnDa7AAop9b62QwJUe?= =?us-ascii?Q?bFyAL2xSliLL9vtcQQzLvULlqHQ8O0wKXwnUPlOh34KUsELlb75dxbeRQFTc?= =?us-ascii?Q?iO6EH+/ApfaSdY2F/Kckx60B0Pw4mpPfGfU9+rLeovKWAs2Bog+209D0NiKd?= =?us-ascii?Q?reBjD9PEydCrj13DN9jpYQ7t5uNChnO47V5Nxb/K9M8f6+mV4HHSp63vyRcc?= =?us-ascii?Q?ayO4GeLIg2k11e5EGgbk7bH9FOpi4I7G2WLLzaWh1taG6/w3TzaKyqJMgxZN?= =?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9L0BQSRm9A3EbRmA7RRdvyGZ3un/?= =?us-ascii?Q?bTVsPQlAVROwJd9hK5I=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2b52474-0164-4b6e-785c-08dbfd0c8a14 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2023 01:24:10.0789 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: a6TeWivlqZZ4fx7ERjdf4AollRd7fiAsqbuDHPRvgxGr8SJRqHW4zxbfr0huOMSPr7OW/3rff/cCDGiUyO1ioQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8559 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,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: FoQjokSqn1vsXQHbcEUp54e2x7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=mgSy0u0j; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Thanks for catching this issue. Reviewed-by: Nickle Wang Regards, Nickle > -----Original Message----- > From: Mike Maslenkin > Sent: Friday, December 15, 2023 8:04 AM > To: devel@edk2.groups.io > Cc: abner.chang@amd.com; Nickle Wang ; > igork@ami.com; Mike Maslenkin > Subject: [edk2-redfish-client][PATCH 3/4] RedfishClientPkg: fix access to > unitialized variable. >=20 > External email: Use caution opening links or attachments >=20 >=20 > It is possible that at the time of accessing to AsciiLocation pointer the= memory is > not allocated. >=20 > Also gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) emits a warning for th= is case: >=20 > RedfishFeatureUtilityLib.c:1889:37: error: 'AsciiLocation' may be used > uninitialized in this function [-Werror=3Dmaybe-uninitialized] > *Location =3D StrAsciiToUnicode (AsciiLocation); >=20 > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nickle Wang > Signed-off-by: Mike Maslenkin > --- > .../RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib.c > b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib.c > index 0f0b050d7eba..01c054ae3b70 100644 > --- > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtility= Lib.c > +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUt > +++ ilityLib.c > @@ -1856,7 +1856,8 @@ GetEtagAndLocation ( > } >=20 >=20 >=20 > if (Location !=3D NULL) { >=20 > - *Location =3D NULL; >=20 > + *Location =3D NULL; >=20 > + AsciiLocation =3D NULL; >=20 >=20 >=20 > if (*(Response->StatusCode) =3D=3D HTTP_STATUS_200_OK) { >=20 > Header =3D HttpFindHeader (Response->HeaderCount, Response->Header= s, > 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 (#112582): https://edk2.groups.io/g/devel/message/112582 Mute This Topic: https://groups.io/mt/103181640/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-