From nobody Mon Feb 9 16:34:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42971+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42971+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561696153; cv=none; d=zoho.com; s=zohoarc; b=awB8mMZK3hcbTHiV77o1UqOqoUiifpJdQmIlAkUFd+AGIzLAk6fwdmaTSDrJlRNhWBKELn50rYhbpAEhp2JQdUr4hsgvtTmXowLXE02YjW67/qeQlZxwhRBgABqqpIEKoZ3YUvWRmmc6a7QP9M/Gq06Ln/6Kb5Y6kALcLrgSuBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561696153; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=aWpgJ7Bcbm7gxU5ZGM6LW1XZAPneDM/0QQ2B+qKcHQA=; b=ifWKhrzlBwnD4D2rvJ5igaSIxAlnm9X/TYiMwB0D4Wx2w+5YaI5qr2Eb5d/KZf2V3d+JXhAyfhTpNBioI2viLRoGVnkRJyx0nwukL9vWj69PtyEKgu/gLQYui64+t4AJ8YejF2D/GxUGYzuD4bKIDVZ4eOzs3GF9EWrmgmwI7cA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42971+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561696153741719.0606372278247; Thu, 27 Jun 2019 21:29:13 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com []) by groups.io with SMTP; Thu, 27 Jun 2019 21:29:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 20:58:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,426,1557212400"; d="scan'208";a="183599691" X-Received: from fieedk001.ccr.corp.intel.com ([10.239.33.119]) by fmsmga001.fm.intel.com with ESMTP; 27 Jun 2019 20:58:01 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Laszlo Ersek Subject: [edk2-devel] [PATCH 3/3] MdePkg/BaseLib: Base64Decode: Add decription for RETURN_SUCCESS Date: Fri, 28 Jun 2019 11:57:46 +0800 Message-Id: <20190628035746.24160-4-zhichao.gao@intel.com> In-Reply-To: <20190628035746.24160-1-zhichao.gao@intel.com> References: <20190628035746.24160-1-zhichao.gao@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,zhichao.gao@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561696153; bh=WMkdBzvHhmZylhSCDbly7KHTQBQcKEgDRZCuEc4b+eI=; h=Cc:Date:From:Reply-To:Subject:To; b=AazoqC4Z3N+Ane542E5i3jPOhokgqSlmKf5z3vP8TYPQbjusuXjs9O1aPuehMjEEPnh f1Cjpglx9fUuiR4dwZq2EEfCaP1+cv35IgrI9tBK7ZNnrehOXl+UVKJg7K+6bh7MiBDCh moa75mtn544lCp360rR0WBz6ZRHHwvTEpXo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1891 While the convertion Base64 ascii string is null string (the string only contain white space would be regard as null string), there would be no decodeable data. Set *DestinationSize to zero and return RETURN_SUCCESS. But it is not mention in the comment of the function. So add this decription. Cc: Michael D Kinney Cc: Liming Gao Cc: Laszlo Ersek Signed-off-by: Zhichao Gao --- MdePkg/Library/BaseLib/String.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/Strin= g.c index 7ebc2ecddd..8829d2cbbf 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -1929,7 +1929,8 @@ Base64Encode ( @param DestinationSize Caller is responsible for passing in buffer of = at least DestinationSize. Set 0 to get the size needed. Set to bytes stor= ed on return. =20 - @retval RETURN_SUCCESS When binary buffer is filled in. + @retval RETURN_SUCCESS When binary buffer is filled in. Or i= f the Base64 ascii string is empty, set + *DestinationSize to zero to indicate = this case. @retval RETURN_INVALID_PARAMETER If Source is NULL or DestinationSize = is NULL. @retval RETURN_INVALID_PARAMETER If SourceLength or DestinationSize is= bigger than (MAX_ADDRESS -(UINTN)Destination ). @retval RETURN_INVALID_PARAMETER If there is any invalid character in = input stream. --=20 2.21.0.windows.1 -=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 (#42971): https://edk2.groups.io/g/devel/message/42971 Mute This Topic: https://groups.io/mt/32238990/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-