From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.49]) by mx.groups.io with SMTP id smtpd.web10.68327.1684075736141981597 for ; Sun, 14 May 2023 07:48:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=RnTHdAIC; 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.244.49, mailfrom: abner.chang@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l8nVJIzA7kvpP0VXp+X4BvKkULAZIfn+y2vDFF+J1NpbevxFq6WLlYdTjAXDFqiMwVCbmroPEecyyC656AwJ6Ru6x/XKpuZ6+1rmwxgngRV9ZwgXevuu8Ct+2EMxXPN67ekjsyGmY8k9+7jIc0mV/UVNqr6O5h7nwlwvnbOgO82e8zmqlaffvsQQFtLgFgAEKMf80AJdRYU41VvaKF0vGcaAy+TV4AmoT+NNzzkhp0ZrLVKtPMVE1ZDnrFdQNSqt/SEfakDaTc7tOQmtSUbvylk0Jt7glqI5/Yon+1IH8fYYKEkcf31pjZ428A9TA3NNiBcvcpkd80d0K1XAspo2iA== 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=y7lW1tAaE8a/8kREhynq6h8afl+8ZL9JiVAdllxOLVo=; b=KFRSGsteowCt+iUBIS3oVKJlc8Z8+9njNdFE7UIOpRcadFDuRjYeBz3uMLNmHzBzjH7qIxG7D/LBqAaELidFHWfhAei98XA4qWtX2nKlDS3RikCeLaeW+qPlU+Ki8qzCcpLtAxUtoegMhmIDI883fxWhpgHjXcVoIoqxASjq4gYCBElwGTwFhv1jM201v8ImOliyN/U0UZzbb9bjJ+3xDxmS7bQ+mfUo0/WP4w3qfDZ9eUsiboGMpXO/iW3G1P1FvanuKhacicD8P1ElskYK9SP6RndsRKQQPwOppgBbuuj6yKdWW2D/dtRHdgVv9aSLcpl/jqV4N0ThB0PNVgmqtg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; 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=y7lW1tAaE8a/8kREhynq6h8afl+8ZL9JiVAdllxOLVo=; b=RnTHdAIC1Dccu6Pi+XH2VFRZzB05lfBBD7nuiLA5GoEY3s6cVwGOwYoLxS/Z4RAMubEmeE1tYRkBC+lZzkeqVMak4GHgomnDG3MN0IZItvjLKmjEtOSIwMElKxVHTPakTpUJdwMVgvzckgHxfQT0hR2VgsUt8iyVPssPlkZEPu0= Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by BY5PR12MB4097.namprd12.prod.outlook.com (2603:10b6:a03:213::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Sun, 14 May 2023 14:48:53 +0000 Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::edb0:bed8:c650:5040]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::edb0:bed8:c650:5040%5]) with mapi id 15.20.6387.029; Sun, 14 May 2023 14:48:53 +0000 From: "Chang, Abner" To: Nickle Wang , "devel@edk2.groups.io" CC: Igor Kulchytskyy Subject: Re: [edk2-redfish-client][PATCH] RedfishClientPkg/ConverterLib: Fix empty string value issue Thread-Topic: [edk2-redfish-client][PATCH] RedfishClientPkg/ConverterLib: Fix empty string value issue Thread-Index: AQHZhJqZw505MGlBvUyOrDS9cQn85q9Z3RMw Date: Sun, 14 May 2023 14:48:53 +0000 Message-ID: References: <20230512062529.3944-1-nicklew@nvidia.com> In-Reply-To: <20230512062529.3944-1-nicklew@nvidia.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-05-14T14:48:48Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=4f865c0c-ac1a-4f68-b199-8f7d160c6522; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|BY5PR12MB4097:EE_ x-ms-office365-filtering-correlation-id: d368a282-2ed1-47e7-6ccb-08db548a562f x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: YKVBH/6pXdkBs0jhWHlF767TmdoCfOCVHAp1sXhOursLbiNoRV5wciTE8j0HJDXTzxbr3a/0lx5iBWAKSTF7M1I2Sfs6EJB/ksVqAUPJ8W/j4zo1TcYPL2tDkd7BryV7KCXxshSDKiu4GoQkSrSW4NoOuvLwggdQF3EeIWHJkGUKAaMG2GotSsWyA4x0CwMdF/oPYxSb6mFReY4c7qZavm306WdMyJsag1ldSMPC+afoh8KCY97rCnvebUNHYmJEhXaTB2ymptiZKhrKAJ12JyoVhKQmRKtLm8LdcFqoARrF3zgOVBwJZOMMeuB3l+hF4s+PGS9QaKcX6Xp3TVIOTTMscl4RHICYAVkqvwdifRLX+yU8KtQfKy8eK2nWm7X7NPAQAu5kp/C3c1uH8TTZ+cBvIvyH23h0PCyqIJuPT24OU+uBqEi8w+N2LQimSoUZdHkMingFFH6zmyiX+uEvJ2tENAal58oQAxpHMpDAhDRiwuRQ6M69NNBxZfOZhv+ZGp2yeXB530rcHX1B6OJO6nsgF1uNJ4f+ImbxAi5JVVHlcFBvRzMqL+xyI8y3LvhZOkw6QNW+MsL25qiLBkD2eAw/V7DxJL5YsPYwZ+SsM92zL5/M+cjsrQ+3nOfqrA7c x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3966.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(346002)(39850400004)(376002)(396003)(451199021)(83380400001)(64756008)(66446008)(66476007)(66556008)(66946007)(76116006)(55016003)(7696005)(53546011)(9686003)(6506007)(478600001)(110136005)(186003)(71200400001)(86362001)(2906002)(8676002)(8936002)(52536014)(5660300002)(33656002)(4326008)(41300700001)(38070700005)(38100700002)(122000001)(316002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZnYXslllP0AKvTOlvl/nQ+oVxq+3nBwiuBTDIV7H1gEhaUotyHlfLXNzMRCv?= =?us-ascii?Q?CIxzlg5nQ6gwcbiZhpL/EZqwwO4J3YW9w0TSmLYC5vKESm5y+SwJ6CTGRAhC?= =?us-ascii?Q?VaPjMkPdRhfz+yd5nXgVvfUgOOvS375DzjciCDMaSVlgTpsNIT/xV7IalO0q?= =?us-ascii?Q?p/w+MexjciEzMraCzZWeahBwmLXNdNycQ0USlPgXcJTNCXPCtk86zd2Iwu6Y?= =?us-ascii?Q?lWRK3WYMY16UBX4iw9sWDoYMcNwe0Roat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5CgARzcNIb3F4wSKws7E1nzbiw/uDNQC9cmVPKHi7RT?= =?us-ascii?Q?238JZoAp3XYEc7IyOxGMsyY8lCD4mKvuvZrI2/3E/y2Jrdmbr8/kazhZ8JQI?= =?us-ascii?Q?MGCRtQ9/K3AxNj/03Sl+MRE4lLbQEDsRdUGPQTJ7FNBaTl8i6rUaYVoXIh5u?= =?us-ascii?Q?0IrrNNnHNpVawDD26A6xg4dQEsjr8nw9KOOaqVyqESqRm5qZCHCxVuChty+6?= =?us-ascii?Q?ebM0vLVyFl8ftj1yeqHLeAylMrn34PBgM/Y0bhuskF58TLSb+kt1iPYvO+ZK?= =?us-ascii?Q?vm+l5WKFgR2pVbnsVr8O/iHJIy+fOyF0W9iLMQLR+/Y716Ddo4dB/ReYP1z0?= =?us-ascii?Q?NHIeqtwIyCH7fuCGTcl/Ck+tH+mn2rRuCvMABzLlQJSD3kLoAPw6dk+LAg?= =?us-ascii?Q?=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d368a282-2ed1-47e7-6ccb-08db548a562f X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2023 14:48:53.0974 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xiEdhLW2YScHjjz8xpZwDzAhyJu/zafPeeK2ozzS6vcdW3G84aCTWw2dRbWvQnYyA6BC35V75/Or6wAPZBAzwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4097 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Reviewed-by: Abner Chang > -----Original Message----- > From: Nickle Wang > Sent: Friday, May 12, 2023 2:25 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > > Subject: [edk2-redfish-client][PATCH] RedfishClientPkg/ConverterLib: Fix > empty string value issue >=20 > Caution: This message originated from an External Source. Use proper > caution when opening attachments, clicking links, or responding. >=20 >=20 > allocateDuplicateStr() will not copy input string when input > string is empty string. It returns NULL pointer and creates > assertion in application driver. >=20 > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Igor Kulchytskyy > --- > RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > b/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > index 964904a2..02fcb2b2 100644 > --- a/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > +++ b/RedfishClientPkg/ConverterLib/src/RedfishCsCommon.c > @@ -223,7 +223,7 @@ allocateDuplicateStr ( > { > RedfishCS_status Status; >=20 > - if ((Str =3D=3D NULL) || (strlen (Str) =3D=3D 0)) { > + if (Str =3D=3D NULL) { > *DstBuffer =3D NULL; > return RedfishCS_status_success; > } > -- > 2.17.1