From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.92.67.37]) by mx.groups.io with SMTP id smtpd.web11.9999.1589534931847007939 for ; Fri, 15 May 2020 02:28:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: outlook.de, ip: 40.92.67.37, mailfrom: mhaeuser@outlook.de) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P/fw8YPJjd4Xp6q8EK6dWgbvfSNByJr8xUWDRHIxNFhXdoO1wE9cGjK3K13OWacwovZ1ZHyUuL5IBOlHfE+h3dgIUPM1MJWpsc9Xz2Yudx3rlxShgi7mDlNgqMtTmQk4i5Rv/cjGKnA0Ew4Rcm72TCPl2YvRgY6sXxETY8Bmtp/W6Xx7gp2jR+0p3FzvSC8grf4O0tFx4WF4aMhuVKZnvdNPz9vBNDmdNbsIT2RtGMSiFv4NJNK9sLkeWc9cSQCztMUayMXtBJZ3VB7B36kzEGfDPWPHgzK8xbi3e3egxKrVFvTtWwhpUNWMhVMmSU32ySvau2GuQUyNLLn8IjPVAQ== 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-SenderADCheck; bh=2db67XU9Fe+l+scol4TiVrx7LFp/MlZampo2ngNO2No=; b=nliyqxjceyYAW/RQpfI/vypXO1okIBr9AkgQyNITKDh2oMd/XhYW26YgIthwQh4rzCzY9DK2XDSlt2yWdRcuVgoThQtNaKXLuB7DOej/vcZOVr5PyUSCj5h/lDBtbedFZ2spNuq+KrtfuRJ3hfp90Y7C56NkAAOtMT6A6HPt0Xc+mrDdJ96RAesJmjkFOLlo7hKF2GEUO5AOtcSMX8wpM43azYUJ+Pot65s6arS5xH/QMg1yBNP8rbLmOuskyz5zWiirnH8tDIc0MW5WfQjFA+SgEkRg6/xsyw8SZ33eMOmMryUz5a7KO72jGbkPyxUfn3kZrd+0Ngv+6MjtUYM/HA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.de; dmarc=pass action=none header.from=outlook.de; dkim=pass header.d=outlook.de; arc=none Received: from AM5EUR02FT042.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1c::49) by AM5EUR02HT206.eop-EUR02.prod.protection.outlook.com (2a01:111:e400:7e1c::449) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19; Fri, 15 May 2020 09:28:49 +0000 Received: from AM0P193MB0305.EURP193.PROD.OUTLOOK.COM (2a01:111:e400:7e1c::4a) by AM5EUR02FT042.mail.protection.outlook.com (2a01:111:e400:7e1c::362) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19 via Frontend Transport; Fri, 15 May 2020 09:28:49 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:6F52C99627058ACEA11F1FF9022B99118C83FFA764CACB7A2B72DCE61B535376;UpperCasedChecksum:88C291E55723FE1C2C3B985AB7E55A9C4AD8FB26132C3488DFD2C14CB5450CD9;SizeAsReceived:9949;Count:49 Received: from AM0P193MB0305.EURP193.PROD.OUTLOOK.COM ([fe80::2d15:d680:b34a:ae3a]) by AM0P193MB0305.EURP193.PROD.OUTLOOK.COM ([fe80::2d15:d680:b34a:ae3a%7]) with mapi id 15.20.3000.022; Fri, 15 May 2020 09:28:49 +0000 Subject: Re: [EXTERNAL] Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix SafeString performing assertions on runtime checks To: devel@edk2.groups.io, michael.d.kinney@intel.com, "bret.barkelew@microsoft.com" , "cheptsov@ispras.ru" CC: Andrew Fish , Ard Biesheuvel , "Brian J . Johnson" , "Chiu, Chasel" , "Justen, Jordan L" , Laszlo Ersek , Leif Lindholm , "Gao, Liming" , "Zimmer, Vincent" , "Gao, Zhichao" References: <20200514092537.29609-1-cheptsov@ispras.ru> <20200514092537.29609-2-cheptsov@ispras.ru> From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= Message-ID: Date: Fri, 15 May 2020 11:28:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 In-Reply-To: X-ClientProxiedBy: AM0PR03CA0016.eurprd03.prod.outlook.com (2603:10a6:208:14::29) To AM0P193MB0305.EURP193.PROD.OUTLOOK.COM (2603:10a6:208:5c::28) Return-Path: mhaeuser@outlook.de X-Microsoft-Original-Message-ID: <799091aa-e0fb-ca74-0671-691e0eb37b8e@outlook.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.234] (95.88.216.169) by AM0PR03CA0016.eurprd03.prod.outlook.com (2603:10a6:208:14::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Fri, 15 May 2020 09:28:41 +0000 X-Microsoft-Original-Message-ID: <799091aa-e0fb-ca74-0671-691e0eb37b8e@outlook.de> X-TMN: [wOmgpWKmwkJxHydAtBlJtQjNErQnxBjO] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: efe3d52a-f583-467c-958e-08d7f8b25ddd X-MS-TrafficTypeDiagnostic: AM5EUR02HT206: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TN1w07kmUmghYOHhAhBN68tVYrGrzltRcA8y4OzYPMyUoE7w5zbXzUuWa89yMQ9RCq3UbVOLM+pDc/vi288J+tMG5HqJ61t/g07QuVbawsOf+NoamDCfMNVb10EV8dmhxwWLoC8hb+mKw1IMzp6Y9ajFbthilRATP2x0u3yTnYK6x+0AnCKtinLaxhatLCgCJlEDUbMb2MrcIvc1qomiRBr1OG3WfDv133F9FQAnO/039Ozwz7YyIYNtDPFLie1P X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:AM0P193MB0305.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: Ot4HoVq/QPLiDaaJWJwXS/ngwx2xzGDYx7VSmHz+c1UH7GFfNOwqJkc0gvoYRpa9Gn6cxSHjUjry3fln9GKg/ywrsfDXxYHZQzkPnVbv+jC3IIjATHf5zj/54oov9N3ftnsxzMaLnc1PtkssFgFVIA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: efe3d52a-f583-467c-958e-08d7f8b25ddd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 09:28:49.2105 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT206 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Good day Mike, You can also set a different union member to an unaligned pointer and=20 grab a CHAR16* member. What all those cases have in common is that they=20 are UB. If that is what you are trying to do, you cannot find any way at= =20 all to get an unaligned pointer without UB. It is not just that they may= =20 not be dereferenced, they need not be representable at all. I'm voicing this now because as part of the reworked PE loader we=20 mentioned a few times that family of problems will get further attention= =20 and it's best to find an agreement early. If we have an unaligned=20 pointer, it is already too late, so the inverted ASSERT condition is=20 insane. As such, I don't believe there is a need for a runtime error at=20 all, as what is checked for is "impossible" and may even not be accurate= =20 - at that point it's a lucky heuristic. In fact, the ASSERTs should=20 possibly be removed entirely, but in a separate(!) patch set in a=20 separate BZ that also targets Read/WriteUnaligned* and similar issues as= =20 they are found. This patch does exactly what is described, preserve=20 RELEASE runtime behaviour. For your specific example, you can use -Waddress-of-packed-member to not= =20 have to rely on ASSERTs catching it. Please feel free to comment on this matter as time permits, but in=20 respect to Vitaly's several attempts to fix the original BZ, I'd like to= =20 ask you to consider devoting your time to ensure this patch can land in=20 the next stable tag first and postpone the alignment discussion till=20 after the actual matter is resolved. Regards, Marvin Am 15.05.2020 um 00:14 schrieb Michael D Kinney: > Bret, >=20 > I agree with all your points.Which is why I am asking if we should=20 > address this in the current patch under review. >=20 > I will also point out that another way to get an off pointer address=20 > value for a CHAR16 is through use of packed structures.If a CHAR16=20 > string is in a packaged structure and starts at an odd byte offset, then= = =20 > directly passing the CHAR16 string field to one of these APIs will=20 > ASSERT() or generate an exception if the ASSERT()s are removed.When=20 > using packed structures, fields that are larger than 1-byte need to=20 > either be copied to an aligned location or accessed using the Unaligned= =20 > Read/Write APIs. >=20 > Mike >=20 > *From:*devel@edk2.groups.io *On Behalf Of *Bret= =20 > Barkelew via groups.io > *Sent:* Thursday, May 14, 2020 2:15 PM > *To:* devel@edk2.groups.io; Kinney, Michael D=20 > ; cheptsov@ispras.ru > *Cc:* Andrew Fish ; Ard Biesheuvel=20 > ; Brian J . Johnson ;= =20 > Chiu, Chasel ; Justen, Jordan L=20 > ; Laszlo Ersek ; Leif=20 > Lindholm ; Gao, Liming ; Marvin= = =20 > H=C3=A4user ; Zimmer, Vincent=20 > ; Gao, Zhichao > *Subject:* Re: [EXTERNAL] Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix=20 > SafeString performing assertions on runtime checks >=20 > Why isn=E2=80=99t that a failed return value? >=20 > That would be unexpected behavior in RELEASE. >=20 > Either that, or the function should take in a substitution character=20 > (e.g. =E2=80=98?=E2=80=99) for invalid characters. >=20 > The prototype of this function is bad if it doesn=E2=80=99t allow for th= is=20 > possibility, and an ASSERT isn=E2=80=99t making code any better/safer by= only=20 > ASSERTing. >=20 > - Bret >=20 > *From: *Michael D Kinney via groups.io=20 > > *Sent: *Thursday, May 14, 2020 2:07 PM > *To: *devel@edk2.groups.io ;=20 > cheptsov@ispras.ru ; Kinney, Michael D=20 > > *Cc: *Andrew Fish ; Ard Biesheuvel=20 > ; Bret Barkelew=20 > ; Brian J . Johnson=20 > ; Chiu, Chasel=20 > ; Justen, Jordan L=20 > ; Laszlo Ersek=20 > ; Leif Lindholm ;=20 > liming.gao ; Marvin H=C3=A4user=20 > ; Zimmer, Vincent=20 > ; Gao, Zhichao=20 > > *Subject: *[EXTERNAL] Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix=20 > SafeString performing assertions on runtime checks >=20 > Hi Vitaly, >=20 > What about this ASSERT() in UnicodeStrnToAsciiStrS().=C2=A0 It is an ASS= ERT()=20 > on the data contents. >=20 > =C2=A0 // >=20 > =C2=A0 // Convert string >=20 > =C2=A0 // >=20 > =C2=A0 while ((*Source !=3D 0) && (SourceLen > 0)) { >=20 > =C2=A0=C2=A0=C2=A0 // >=20 > =C2=A0=C2=A0=C2=A0 // If any Unicode characters in Source contain non-z= ero value in=20 > the upper >=20 > =C2=A0=C2=A0=C2=A0 // 8 bits, then ASSERT(). >=20 > =C2=A0=C2=A0=C2=A0 // >=20 > ASSERT (*Source < 0x100); >=20 > =C2=A0=C2=A0=C2=A0 *(Destination++) =3D (CHAR8) *(Source++); >=20 > =C2=A0=C2=A0=C2=A0 SourceLen--; >=20 > =C2=A0=C2=A0=C2=A0 (*DestinationLength)++; >=20 > =C2=A0 } >=20 > =C2=A0 *Destination =3D 0; >=20 > Mike >=20 > *From:* devel@edk2.groups.io =20 > > *On Behalf Of=20 > *Vitaly Cheptsov > *Sent:* Thursday, May 14, 2020 11:59 AM > *To:* Kinney, Michael D > > *Cc:* devel@edk2.groups.io ; Andrew Fish=20 > >; Ard Biesheuvel=20 > >; Bret=20 > Barkelew >; Brian J . Johnson=20 > >; Chiu, Chasel=20 > >; Justen, Jordan L= = =20 > >; Laszlo= =20 > Ersek >; Leif Lindholm=20 > >; Gao, Liming=20 > >; Marvin H=C3=A4user= = =20 > >; Zimmer, Vincent=20 > >; Gao,=20 > Zhichao > > *Subject:* Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix SafeString=20 > performing assertions on runtime checks >=20 > Mike, >=20 > The code you posted may inflict undefined behaviour is not valid C for= =20 > several reasons. The compiler is free to do whatever it desires. Please= =20 > refer to ISO/IEC 9899 for more details. >=20 > If applications cast raw pointers to typed pointers without checking=20 > their alignment, well, god bless them :) >=20 > My opinion is both the compiler and the hardware are welcome to do the= =20 > worst once your third line is discovered. On a number of CPUs such=20 > addresses cannot be even represented in the first place. >=20 > Yet, once again it is out of the scope of the current problem. >=20 > Best wishes, >=20 > Vitaly >=20 > 14 =D0=BC=D0=B0=D1=8F 2020 =D0=B3., =D0=B2 20:58, Kinney, Michael D > > > =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 > Vitaly, >=20 > Why do you think there is no way to craft an odd address > without memory corruption. >=20 > UINT8 =C2=A0=C2=A0ByteArray[100]; > CHAR16 =C2=A0*String >=20 > String =3D (CHAR16 *)(&Array[3]); >=20 > The reason I raised the question of these other ASSERT()s > is that I thought the use case was using these safe string > APIs from a UEFI App, and the UEFI App always wants to evaluate > the return status to know if the operation was completed or > not. =C2=A0In build that removes all ASSERT()s, an odd address > will generate an exception on some CPU archs. =C2=A0Wouldn=E2=80=99t= it > be better for the UEFI App that is already designed to handle > error return status to get an error code instead of an > exception? >=20 > Mike >=20 > -----Original Message----- > From:devel@edk2.groups.io > > On > Behalf Of Vitaly Cheptsov > Sent: Thursday, May 14, 2020 10:39 AM > To: Kinney, Michael D > > Cc:devel@edk2.groups.io ; Andrew Fi= sh > >; Ard Biesheuvel > >; > Bret Barkelew > >; Brian J . Johnson > >; Chiu, Ch= asel > >; Justen, > Jordan L > >; > Laszlo Ersek > >; Leif Lindholm > >; > Gao, Liming >; Marvin H=C3=A4user > >; Zimmer, Vinc= ent > >; > Gao, Zhichao > > > Subject: Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix > SafeString performing assertions on runtime checks >=20 > Mike, >=20 > Firstly, NULL check and odd-address checks are > essentially different things: > =E2=80=94 NULL address is basically =C2=ABno object=C2=BB, =C2= =ABoptional > argument=C2=BB (e.g. failed allocation). > =E2=80=94 Odd address is memory corruption, as there is no way > to craft such address anyhow else. > For this reason the implementation is allowed to treat > them differently. >=20 > Secondly, as I said in my cover letter there is no > behaviour change here for RELEASE builds. Behaviour > changes unrelated to the bugfix will have to go to a > separate patch. I agree that we may want to reconsider > the interface in the future, but that=E2=80=99s for a separate > bugzilla and patch. Not discussing it currently is > important to avoid diverting from the primary problem. > Could create a bugzilla not to forget about it soon > after the stable tag. >=20 > Best wishes, > Vitaly >=20 > 14 =D0=BC=D0=B0=D1=8F 2020 =D0=B3., =D0=B2 19:38, Kinney, Mi= chael D >=20 > > > =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 >=20 > Why preserve the ASSERT()s for an a Unicode strings > that are not aligned in a 16-bit boundary? >=20 > This is essentially the same as an invalid pointer >=20 > value >=20 > just like NULL. =C2=A0If NULL pointer returns an error >=20 > code, >=20 > shouldn't and invalid pointer value? >=20 > Thanks, >=20 > Mike >=20 > -----Original Message----- > From: devel@edk2.groups.io > > On > Behalf Of Vitaly Cheptsov > Sent: Thursday, May 14, 2020 2:26 AM > To: devel@edk2.groups.io > Cc: Andrew Fish >; Ard Biesheuvel > >; Bret Barkelew > >; Brian J . Johnson > >; > Chiu, Chasel > >; > Justen, Jordan L > >; Laszlo Ersek > >; Leif > Lindholm >=20 > >; >=20 > Gao, Liming >; Marvin H=C3=A4user > >; > Kinney, Michael D > >; Zimmer, Vincent > >; Gao, Zhichao > > > Subject: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix > SafeString performing assertions on runtime checks >=20 > REF: > https://bugzilla.tianocore.org/show_bug.cgi?id=3D2054 > >=20 >=20 >=20 >=20 >=20 > Runtime checks returned via status return code >=20 > should >=20 > not work as >=20 >=20 > assertions to permit parsing not trusted data with > SafeString >=20 >=20 > interfaces. >=20 >=20 >=20 >=20 >=20 > CC: Andrew Fish > >=20 >=20 > CC: Ard Biesheuvel > >=20 >=20 > CC: Bret Barkelew > >=20 >=20 > CC: Brian J. Johnson > >=20 >=20 > CC: Chasel Chiu > >=20 >=20 > CC: Jordan Justen > >=20 >=20 > CC: Laszlo Ersek > >=20 >=20 > CC: Leif Lindholm > >=20 >=20 > CC: Liming Gao > >=20 >=20 > CC: Marvin H=C3=A4user > >=20 >=20 > CC: Mike Kinney > >=20 >=20 > CC: Vincent Zimmer > >=20 >=20 > CC: Zhichao Gao > >=20 >=20 > Signed-off-by: Vitaly Cheptsov >=20 > > >=20 >=20 >=20 > --- >=20 >=20 > MdePkg/Include/Library/BaseLib.h =C2=A0=C2=A0=C2=A0| 120= ++-------- >=20 > -- >=20 > -------- >=20 >=20 > MdePkg/Library/BaseLib/SafeString.c | =C2=A080 ---------= - >=20 > -- >=20 > - >=20 >=20 > 2 files changed, 7 insertions(+), 193 deletions(-) >=20 >=20 >=20 >=20 >=20 > diff --git a/MdePkg/Include/Library/BaseLib.h > b/MdePkg/Include/Library/BaseLib.h >=20 >=20 > index ecadff8b23..62dc3151bc 100644 >=20 >=20 > --- a/MdePkg/Include/Library/BaseLib.h >=20 >=20 > +++ b/MdePkg/Include/Library/BaseLib.h >=20 >=20 > @@ -189,7 +189,6 @@ StrnSizeS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -225,7 +224,6 @@ StrCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Length > 0 and Destination is not aligned on a > 16-bit boundary, then ASSERT(). >=20 >=20 > =C2=A0If Length > 0 and Source is not aligned on a 16- >=20 > bit >=20 > boundary, then ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -263,7 +261,6 @@ StrnCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -303,7 +300,6 @@ StrCatS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -350,12 +346,7 @@ StrnCatS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > @@ -406,12 +397,7 @@ StrDecimalToUintnS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > @@ -467,12 +453,7 @@ StrDecimalToUint64S ( >=20 >=20 > =C2=A0the first character that is a not a valid > hexadecimal character or NULL, >=20 >=20 > =C2=A0whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > @@ -528,12 +509,7 @@ StrHexToUintnS ( >=20 >=20 > =C2=A0the first character that is a not a valid > hexadecimal character or NULL, >=20 >=20 > =C2=A0whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > @@ -622,8 +598,6 @@ AsciiStrnSizeS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0This function is similar as strcpy_s defined in >=20 > C11. >=20 >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A pointer to a > Null-terminated Ascii string. >=20 >=20 > @@ -656,8 +630,6 @@ AsciiStrCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0This function is similar as strncpy_s defined in > C11. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A pointer to a > Null-terminated Ascii string. >=20 >=20 > @@ -692,8 +664,6 @@ AsciiStrnCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0This function is similar as strcat_s defined in >=20 > C11. >=20 >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A pointer to a > Null-terminated Ascii string. >=20 >=20 > @@ -730,8 +700,6 @@ AsciiStrCatS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0This function is similar as strncat_s defined in > C11. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A pointer to a > Null-terminated Ascii string. >=20 >=20 > @@ -777,12 +745,6 @@ AsciiStrnCatS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINTN, then >=20 >=20 > @@ -832,12 +794,6 @@ AsciiStrDecimalToUintnS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINT64, then >=20 >=20 > @@ -891,12 +847,6 @@ AsciiStrDecimalToUint64S ( >=20 >=20 > =C2=A0character that is a not a valid hexadecimal > character or Null-terminator, >=20 >=20 > =C2=A0whichever on comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINTN, then >=20 >=20 > @@ -950,12 +900,6 @@ AsciiStrHexToUintnS ( >=20 >=20 > =C2=A0character that is a not a valid hexadecimal > character or Null-terminator, >=20 >=20 > =C2=A0whichever on comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINT64, then >=20 >=20 > @@ -1506,16 +1450,8 @@ StrHexToUint64 ( >=20 >=20 > =C2=A0"::" can be used to compress one or more groups o= f >=20 > X >=20 > when X contains only 0. >=20 >=20 > =C2=A0The "::" can only appear once in the String. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Address is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 >=20 >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If EndPointer is not NULL and Address is >=20 > translated >=20 > from String, a pointer >=20 >=20 > =C2=A0to the character that stopped the scan is stored >=20 > at >=20 > the location pointed to >=20 >=20 > =C2=A0by EndPointer. >=20 >=20 > @@ -1567,15 +1503,10 @@ StrToIpv6Address ( >=20 >=20 > =C2=A0When /P is in the String, the function stops at >=20 > the >=20 > first character that is not >=20 >=20 > =C2=A0a valid decimal digit character after P is > converted. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Address is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If PcdMaximumUnicodeStringLength is not zero, and > String contains more than >=20 >=20 > =C2=A0PcdMaximumUnicodeStringLength Unicode characters, > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If EndPointer is not NULL and Address is >=20 > translated >=20 > from String, a pointer >=20 >=20 > =C2=A0to the character that stopped the scan is stored >=20 > at >=20 > the location pointed to >=20 >=20 > @@ -1640,8 +1571,6 @@ StrToIpv4Address ( >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0oo =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Data4[48:55] >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pp =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Data4[56:63] >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Guid is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0String =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to a >=20 > Null- >=20 > terminated Unicode string. >=20 >=20 > @@ -1676,17 +1605,6 @@ StrToGuid ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Buffer is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Length is not multiple of 2, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero and > Length is greater than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If MaxBufferSize is less than (Length / 2), then > ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0@param =C2=A0String =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to a >=20 > Null- >=20 > terminated Unicode string. >=20 >=20 > =C2=A0@param =C2=A0Length =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0The number of > Unicode characters to decode. >=20 >=20 > =C2=A0@param =C2=A0Buffer =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to the > converted bytes array. >=20 >=20 > @@ -1777,7 +1695,6 @@ UnicodeStrToAsciiStr ( >=20 >=20 > =C2=A0the upper 8 bits, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -1818,22 +1735,23 @@ UnicodeStrToAsciiStrS ( >=20 >=20 > =C2=A0bits of each Unicode character. The function > terminates the Ascii string >=20 >=20 > =C2=A0Destination by appending a Null-terminator >=20 > character >=20 > at the end. >=20 >=20 >=20 >=20 >=20 > - =C2=A0The caller is responsible to make sure >=20 > Destination >=20 > points to a buffer with size >=20 >=20 > - =C2=A0equal or greater than ((StrLen (Source) + 1) * > sizeof (CHAR8)) in bytes. >=20 >=20 > + =C2=A0The caller is responsible to make sure >=20 > Destination >=20 > points to a buffer with >=20 >=20 > + =C2=A0size not smaller than ((MIN(StrLen(Source), >=20 > Length) >=20 > + 1) * sizeof (CHAR8)) >=20 >=20 > + =C2=A0in bytes. >=20 >=20 >=20 >=20 >=20 > =C2=A0If any Unicode characters in Source contain non- >=20 > zero >=20 > value in the upper 8 >=20 >=20 > =C2=A0bits, then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 > + =C2=A0If an error is returned, then Destination and > DestinationLength are >=20 >=20 > + =C2=A0unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Source =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0The pointer to a Null- > terminated Unicode string. >=20 >=20 > =C2=A0@param =C2=A0Length =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0The maximum number of > Unicode characters to >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0convert. >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0The pointer to a Null- > terminated Ascii string. >=20 >=20 > - =C2=A0@param =C2=A0DestMax =C2=A0=C2=A0=C2=A0=C2=A0=C2= = =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0The maximum number of > Destination Ascii >=20 >=20 > - =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0char, including > terminating null char. >=20 >=20 > + =C2=A0@param =C2=A0DestMax =C2=A0=C2=A0=C2=A0=C2=A0=C2= = =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0The maximum number of > Destination Ascii char, >=20 >=20 > + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0including terminating > null char. >=20 >=20 > =C2=A0@param =C2=A0DestinationLength =C2=A0The number o= f Unicode > characters converted. >=20 >=20 >=20 >=20 >=20 > =C2=A0@retval RETURN_SUCCESS =C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0String is > converted. >=20 >=20 > @@ -2388,10 +2306,6 @@ AsciiStrHexToUint64 ( >=20 >=20 > =C2=A0"::" can be used to compress one or more groups o= f >=20 > X >=20 > when X contains only 0. >=20 >=20 > =C2=A0The "::" can only appear once in the String. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Address is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If EndPointer is not NULL and Address is >=20 > translated >=20 > from String, a pointer >=20 >=20 > =C2=A0to the character that stopped the scan is stored >=20 > at >=20 > the location pointed to >=20 >=20 > =C2=A0by EndPointer. >=20 >=20 > @@ -2443,10 +2357,6 @@ AsciiStrToIpv6Address ( >=20 >=20 > =C2=A0When /P is in the String, the function stops at >=20 > the >=20 > first character that is not >=20 >=20 > =C2=A0a valid decimal digit character after P is > converted. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Address is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If EndPointer is not NULL and Address is >=20 > translated >=20 > from String, a pointer >=20 >=20 > =C2=A0to the character that stopped the scan is stored >=20 > at >=20 > the location pointed to >=20 >=20 > =C2=A0by EndPointer. >=20 >=20 > @@ -2508,9 +2418,6 @@ AsciiStrToIpv4Address ( >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0oo =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Data4[48:55] >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pp =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Data4[56:63] >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Guid is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0@param =C2=A0String =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to a >=20 > Null- >=20 > terminated ASCII string. >=20 >=20 > =C2=A0@param =C2=A0Guid =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0Pointer to the > converted GUID. >=20 >=20 >=20 >=20 >=20 > @@ -2541,17 +2448,6 @@ AsciiStrToGuid ( >=20 >=20 > =C2=A0decoding stops after Length of characters and > outputs Buffer containing >=20 >=20 > =C2=A0(Length / 2) bytes. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Buffer is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Length is not multiple of 2, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero and > Length is greater than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If MaxBufferSize is less than (Length / 2), then > ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0@param =C2=A0String =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to a >=20 > Null- >=20 > terminated ASCII string. >=20 >=20 > =C2=A0@param =C2=A0Length =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0The number of >=20 > ASCII >=20 > characters to decode. >=20 >=20 > =C2=A0@param =C2=A0Buffer =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to the > converted bytes array. >=20 >=20 > @@ -2632,7 +2528,6 @@ AsciiStrToUnicodeStr ( >=20 >=20 > =C2=A0equal or greater than ((AsciiStrLen (Source) + 1) >=20 > * >=20 > sizeof (CHAR16)) in bytes. >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -2678,7 +2573,6 @@ AsciiStrToUnicodeStrS ( >=20 >=20 > =C2=A0((MIN(AsciiStrLen(Source), Length) + 1) * sizeof > (CHAR8)) in bytes. >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then Destination and > DestinationLength are >=20 >=20 > =C2=A0unmodified. >=20 >=20 > diff --git a/MdePkg/Library/BaseLib/SafeString.c > b/MdePkg/Library/BaseLib/SafeString.c >=20 >=20 > index 7dc03d2caa..1db42abb05 100644 >=20 >=20 > --- a/MdePkg/Library/BaseLib/SafeString.c >=20 >=20 > +++ b/MdePkg/Library/BaseLib/SafeString.c >=20 >=20 > @@ -14,7 +14,6 @@ >=20 >=20 >=20 >=20 >=20 > #define SAFE_STRING_CONSTRAINT_CHECK(Expression, > Status) =C2=A0\ >=20 >=20 > =C2=A0do { \ >=20 >=20 > - =C2=A0=C2=A0=C2=A0ASSERT (Expression); \ >=20 >=20 > =C2=A0=C2=A0=C2=A0if (!(Expression)) { \ >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return Status; \ >=20 >=20 > =C2=A0=C2=A0=C2=A0} \ >=20 >=20 > @@ -197,7 +196,6 @@ StrnSizeS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -279,7 +277,6 @@ StrCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Length > 0 and Destination is not aligned on a > 16-bit boundary, then ASSERT(). >=20 >=20 > =C2=A0If Length > 0 and Source is not aligned on a 16- >=20 > bit >=20 > boundary, then ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -372,7 +369,6 @@ StrnCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -473,7 +469,6 @@ StrCatS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -590,12 +585,7 @@ StrnCatS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > @@ -705,12 +695,7 @@ StrDecimalToUintnS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > @@ -825,12 +810,7 @@ StrDecimalToUint64S ( >=20 >=20 > =C2=A0the first character that is a not a valid > hexadecimal character or NULL, >=20 >=20 > =C2=A0whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > @@ -956,12 +936,7 @@ StrHexToUintnS ( >=20 >=20 > =C2=A0the first character that is a not a valid > hexadecimal character or NULL, >=20 >=20 > =C2=A0whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > =C2=A0If String is not aligned in a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumUnicodeStringLength is not zero, an= d > String contains more than >=20 >=20 > - =C2=A0PcdMaximumUnicodeStringLength Unicode characters= , > not including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > @@ -1856,8 +1831,6 @@ AsciiStrCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0This function is similar as strncpy_s defined in > C11. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A pointer to a > Null-terminated Ascii string. >=20 >=20 > @@ -1944,8 +1917,6 @@ AsciiStrnCpyS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0This function is similar as strcat_s defined in >=20 > C11. >=20 >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A pointer to a > Null-terminated Ascii string. >=20 >=20 > @@ -2040,8 +2011,6 @@ AsciiStrCatS ( >=20 >=20 >=20 >=20 >=20 > =C2=A0This function is similar as strncat_s defined in > C11. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > =C2=A0@param =C2=A0Destination =C2=A0=C2=A0=C2=A0=C2=A0= = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0A pointer to a > Null-terminated Ascii string. >=20 >=20 > @@ -2154,12 +2123,6 @@ AsciiStrnCatS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINTN, then >=20 >=20 > @@ -2266,12 +2229,6 @@ AsciiStrDecimalToUintnS ( >=20 >=20 > =C2=A0be ignored. Then, the function stops at the first > character that is a not a >=20 >=20 > =C2=A0valid decimal character or a Null-terminator, > whichever one comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid decimal digits in the abov= e > format, then 0 is stored >=20 >=20 > =C2=A0at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINT64, then >=20 >=20 > @@ -2382,12 +2339,6 @@ AsciiStrDecimalToUint64S ( >=20 >=20 > =C2=A0character that is a not a valid hexadecimal > character or Null-terminator, >=20 >=20 > =C2=A0whichever on comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINTN, then >=20 >=20 > @@ -2509,12 +2460,6 @@ AsciiStrHexToUintnS ( >=20 >=20 > =C2=A0character that is a not a valid hexadecimal > character or Null-terminator, >=20 >=20 > =C2=A0whichever on comes first. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Data is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero, and > String contains more than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength Ascii characters, no= t > including the >=20 >=20 > - =C2=A0Null-terminator, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If String has no valid hexadecimal digits in the > above format, then 0 is >=20 >=20 > =C2=A0stored at the location pointed to by Data. >=20 >=20 > =C2=A0If the number represented by String exceeds the > range defined by UINT64, then >=20 >=20 > @@ -2635,7 +2580,6 @@ AsciiStrHexToUint64S ( >=20 >=20 > =C2=A0the upper 8 bits, then ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then the Destination is > unmodified. >=20 >=20 >=20 >=20 >=20 > @@ -2735,7 +2679,6 @@ UnicodeStrToAsciiStrS ( >=20 >=20 > =C2=A0If any Unicode characters in Source contain non- >=20 > zero >=20 > value in the upper 8 >=20 >=20 > =C2=A0bits, then ASSERT(). >=20 >=20 > =C2=A0If Source is not aligned on a 16-bit boundary, >=20 > then >=20 > ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then Destination and > DestinationLength are >=20 >=20 > =C2=A0unmodified. >=20 >=20 > @@ -2948,7 +2891,6 @@ AsciiStrToUnicodeStrS ( >=20 >=20 > =C2=A0((MIN(AsciiStrLen(Source), Length) + 1) * sizeof > (CHAR8)) in bytes. >=20 >=20 >=20 >=20 >=20 > =C2=A0If Destination is not aligned on a 16-bit >=20 > boundary, >=20 > then ASSERT(). >=20 >=20 > - =C2=A0If an error would be returned, then the function > will also ASSERT(). >=20 >=20 >=20 >=20 >=20 > =C2=A0If an error is returned, then Destination and > DestinationLength are >=20 >=20 > =C2=A0unmodified. >=20 >=20 > @@ -3072,10 +3014,6 @@ AsciiStrnToUnicodeStrS ( >=20 >=20 > =C2=A0"::" can be used to compress one or more groups o= f >=20 > X >=20 > when X contains only 0. >=20 >=20 > =C2=A0The "::" can only appear once in the String. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Address is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If EndPointer is not NULL and Address is >=20 > translated >=20 > from String, a pointer >=20 >=20 > =C2=A0to the character that stopped the scan is stored >=20 > at >=20 > the location pointed to >=20 >=20 > =C2=A0by EndPointer. >=20 >=20 > @@ -3291,10 +3229,6 @@ AsciiStrToIpv6Address ( >=20 >=20 > =C2=A0When /P is in the String, the function stops at >=20 > the >=20 > first character that is not >=20 >=20 > =C2=A0a valid decimal digit character after P is > converted. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Address is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0If EndPointer is not NULL and Address is >=20 > translated >=20 > from String, a pointer >=20 >=20 > =C2=A0to the character that stopped the scan is stored >=20 > at >=20 > the location pointed to >=20 >=20 > =C2=A0by EndPointer. >=20 >=20 > @@ -3448,9 +3382,6 @@ AsciiStrToIpv4Address ( >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0oo =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Data4[48:55] >=20 >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0pp =C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Data4[56:63] >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - =C2=A0If Guid is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0@param =C2=A0String =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to a >=20 > Null- >=20 > terminated ASCII string. >=20 >=20 > =C2=A0@param =C2=A0Guid =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0Pointer to the > converted GUID. >=20 >=20 >=20 >=20 >=20 > @@ -3550,17 +3481,6 @@ AsciiStrToGuid ( >=20 >=20 > =C2=A0decoding stops after Length of characters and > outputs Buffer containing >=20 >=20 > =C2=A0(Length / 2) bytes. >=20 >=20 >=20 >=20 >=20 > - =C2=A0If String is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Buffer is NULL, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If Length is not multiple of 2, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If PcdMaximumAsciiStringLength is not zero and > Length is greater than >=20 >=20 > - =C2=A0PcdMaximumAsciiStringLength, then ASSERT(). >=20 >=20 > - >=20 >=20 > - =C2=A0If MaxBufferSize is less than (Length / 2), then > ASSERT(). >=20 >=20 > - >=20 >=20 > =C2=A0@param =C2=A0String =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to a >=20 > Null- >=20 > terminated ASCII string. >=20 >=20 > =C2=A0@param =C2=A0Length =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0The number of >=20 > ASCII >=20 > characters to decode. >=20 >=20 > =C2=A0@param =C2=A0Buffer =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0Pointer to the > converted bytes array. >=20 >=20 > -- >=20 >=20 > 2.24.2 (Apple Git-127) >=20 >=20 >=20 >=20 >=20 >=20