<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Mike, Bret,<div class=""><br class=""></div><div class="">The assertion in UnicodeStrnToAsciiStrS is currently not a runtime check but a precondition. I.e. the function does not work with such sequences.</div><div class=""><br class=""></div><div class="">I fully agree that it is not right, and that we should actually update the documentation and change it to the following construction (0x80 instead of 0x100 for 7-bit ASCII and ‘?’ for invalid patch): </div><div class=""><br class=""></div><div class="">if (*Source < 0x80) {</div><div class="">  *(Destination++) = (CHAR8) *(Source++);</div><div class="">} else {</div><div class="">  *(Destination++) = ‘?';</div><div class="">}</div><div class=""><br class=""></div><div class="">However, it has to be out of the scope of this patch due to the nature of the change: function behaviour change for RELEASE instead of assertion removal for the runtime check as for all the rest. Should file a bugzilla as well.</div><div class=""><br class=""></div><div class="">As for alignment, I believe Marvin explained it well, and I have nothing to add there. There is no need to change the patch anyhow.</div><div class=""><br class=""></div><div class="">Best wishes,</div><div class="">Vitaly</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">15 мая 2020 г., в 01:14, Kinney, Michael D <<a href="mailto:michael.d.kinney@intel.com" class="">michael.d.kinney@intel.com</a>> написал(а):</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">Bret,<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">I agree with all your points.<span class=""> <span class="Apple-converted-space"> </span></span>Which is why I am asking if we should address this in the current patch under review.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">I will also point out that another way to get an off pointer address value for a CHAR16 is through use of packed structures.<span class=""> <span class="Apple-converted-space"> </span></span>If a CHAR16 string is in a packaged structure and starts at an odd byte offset, then directly passing the CHAR16 string field to one of these APIs will ASSERT() or generate an exception if the ASSERT()s are removed.<span class=""> <span class="Apple-converted-space"> </span></span>When using packed structures, fields that are larger than 1-byte need to either be copied to an aligned location or accessed using the Unaligned Read/Write APIs.<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class="">Mike<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><o:p class=""> </o:p></span></div><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span class="">From:</span></b><span class=""><span class="Apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a><span class="Apple-converted-space"> </span><<a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>><span class="Apple-converted-space"> </span><b class="">On Behalf Of<span class="Apple-converted-space"> </span></b>Bret Barkelew via<span class="Apple-converted-space"> </span><a href="http://groups.io/" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">groups.io</a><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, May 14, 2020 2:15 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>; Kinney, Michael D <<a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">michael.d.kinney@intel.com</a>>;<span class="Apple-converted-space"> </span><a href="mailto:cheptsov@ispras.ru" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">cheptsov@ispras.ru</a><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span>Andrew Fish <<a href="mailto:afish@apple.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">afish@apple.com</a>>; Ard Biesheuvel <<a href="mailto:ard.biesheuvel@linaro.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">ard.biesheuvel@linaro.org</a>>; Brian J . Johnson <<a href="mailto:brian.johnson@hpe.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">brian.johnson@hpe.com</a>>; Chiu, Chasel <<a href="mailto:chasel.chiu@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">chasel.chiu@intel.com</a>>; Justen, Jordan L <<a href="mailto:jordan.l.justen@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">jordan.l.justen@intel.com</a>>; Laszlo Ersek <<a href="mailto:lersek@redhat.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lersek@redhat.com</a>>; Leif Lindholm <<a href="mailto:leif@nuviainc.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">leif@nuviainc.com</a>>; Gao, Liming <<a href="mailto:liming.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">liming.gao@intel.com</a>>; Marvin Häuser <<a href="mailto:mhaeuser@outlook.de" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mhaeuser@outlook.de</a>>; Zimmer, Vincent <<a href="mailto:vincent.zimmer@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">vincent.zimmer@intel.com</a>>; Gao, Zhichao <<a href="mailto:zhichao.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">zhichao.gao@intel.com</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [EXTERNAL] Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix SafeString performing assertions on runtime checks<o:p class=""></o:p></span></div></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Why isn’t that a failed return value?<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">That would be unexpected behavior in RELEASE.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Either that, or the function should take in a substitution character (e.g. ‘?’) for invalid characters.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The prototype of this function is bad if it doesn’t allow for this possibility, and an ASSERT isn’t making code any better/safer by only ASSERTing.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">- Bret<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class="">From:<span class="Apple-converted-space"> </span></b><a href="mailto:michael.d.kinney=intel.com@groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Michael D Kinney via groups.io</a><br class=""><b class="">Sent:<span class="Apple-converted-space"> </span></b>Thursday, May 14, 2020 2:07 PM<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>;<span class="Apple-converted-space"> </span><a href="mailto:cheptsov@ispras.ru" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">cheptsov@ispras.ru</a>;<span class="Apple-converted-space"> </span><a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Kinney, Michael D</a><br class=""><b class="">Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:afish@apple.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Andrew Fish</a>;<span class="Apple-converted-space"> </span><a href="mailto:ard.biesheuvel@linaro.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Ard Biesheuvel</a>;<span class="Apple-converted-space"> </span><a href="mailto:Bret.Barkelew@microsoft.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Bret Barkelew</a>;<span class="Apple-converted-space"> </span><a href="mailto:brian.johnson@hpe.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Brian J . Johnson</a>;<span class="Apple-converted-space"> </span><a href="mailto:chasel.chiu@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Chiu, Chasel</a>;<span class="Apple-converted-space"> </span><a href="mailto:jordan.l.justen@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Justen, Jordan L</a>;<span class="Apple-converted-space"> </span><a href="mailto:lersek@redhat.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Laszlo Ersek</a>;<span class="Apple-converted-space"> </span><a href="mailto:leif@nuviainc.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Leif Lindholm</a>;<span class="Apple-converted-space"> </span><a href="mailto:liming.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">liming.gao</a>;<span class="Apple-converted-space"> </span><a href="mailto:mhaeuser@outlook.de" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Marvin Häuser</a>;<span class="Apple-converted-space"> </span><a href="mailto:vincent.zimmer@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Zimmer, Vincent</a>;<span class="Apple-converted-space"> </span><a href="mailto:zhichao.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">Gao, Zhichao</a><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>[EXTERNAL] Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix SafeString performing assertions on runtime checks<o:p class=""></o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi Vitaly,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">What about this ASSERT() in UnicodeStrnToAsciiStrS().  It is an ASSERT() on the data contents.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  //<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  // Convert string<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  //<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  while ((*Source != 0) && (SourceLen > 0)) {<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    //<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    // If any Unicode characters in Source contain non-zero value in the upper<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    // 8 bits, then ASSERT().<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    //<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">   <span class="Apple-converted-space"> </span><span style="background-color: yellow; background-position: initial initial; background-repeat: initial initial;" class="">ASSERT (*Source < 0x100);</span><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    *(Destination++) = (CHAR8) *(Source++);<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    SourceLen--;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">    (*DestinationLength)++;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  }<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">  *Destination = 0;<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Mike<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(225, 225, 225); padding: 3pt 0in 0in;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a><span class="Apple-converted-space"> </span><<a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>><span class="Apple-converted-space"> </span><b class="">On Behalf Of<span class="Apple-converted-space"> </span></b>Vitaly Cheptsov<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Thursday, May 14, 2020 11:59 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Kinney, Michael D <<a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">michael.d.kinney@intel.com</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>; Andrew Fish <<a href="mailto:afish@apple.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">afish@apple.com</a>>; Ard Biesheuvel <<a href="mailto:ard.biesheuvel@linaro.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">ard.biesheuvel@linaro.org</a>>; Bret Barkelew <<a href="mailto:bret.barkelew@microsoft.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">bret.barkelew@microsoft.com</a>>; Brian J . Johnson <<a href="mailto:brian.johnson@hpe.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">brian.johnson@hpe.com</a>>; Chiu, Chasel <<a href="mailto:chasel.chiu@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">chasel.chiu@intel.com</a>>; Justen, Jordan L <<a href="mailto:jordan.l.justen@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">jordan.l.justen@intel.com</a>>; Laszlo Ersek <<a href="mailto:lersek@redhat.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lersek@redhat.com</a>>; Leif Lindholm <<a href="mailto:leif@nuviainc.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">leif@nuviainc.com</a>>; Gao, Liming <<a href="mailto:liming.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">liming.gao@intel.com</a>>; Marvin Häuser <<a href="mailto:mhaeuser@outlook.de" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mhaeuser@outlook.de</a>>; Zimmer, Vincent <<a href="mailto:vincent.zimmer@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">vincent.zimmer@intel.com</a>>; Gao, Zhichao <<a href="mailto:zhichao.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">zhichao.gao@intel.com</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix SafeString performing assertions on runtime checks<o:p class=""></o:p></div></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Mike,<o:p class=""></o:p></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The code you posted may inflict undefined behaviour is not valid C for several reasons. The compiler is free to do whatever it desires. Please refer to ISO/IEC 9899 for more details.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">If applications cast raw pointers to typed pointers without checking their alignment, well, god bless them :)<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">My opinion is both the compiler and the hardware are welcome to do the worst once your third line is discovered. On a number of CPUs such addresses cannot be even represented in the first place.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Yet, once again it is out of the scope of the current problem.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Best wishes,<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Vitaly<o:p class=""></o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p class=""> </o:p></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">14 мая 2020 г., в 20:58, Kinney, Michael D <<a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">michael.d.kinney@intel.com</a>> написал(а):<o:p class=""></o:p></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Vitaly,<br class=""><br class="">Why do you think there is no way to craft an odd address<span class="apple-converted-space"> </span><br class="">without memory corruption.<br class=""><br class="">UINT8   ByteArray[100];<br class="">CHAR16  *String<br class=""><br class="">String = (CHAR16 *)(&Array[3]);<br class=""><br class="">The reason I raised the question of these other ASSERT()s<br class="">is that I thought the use case was using these safe string<br class="">APIs from a UEFI App, and the UEFI App always wants to evaluate<br class="">the return status to know if the operation was completed or<br class="">not.  In build that removes all ASSERT()s, an odd address<br class="">will generate an exception on some CPU archs.  Wouldn’t it<br class="">be better for the UEFI App that is already designed to handle<br class="">error return status to get an error code instead of an<span class="apple-converted-space"> </span><br class="">exception?<br class=""><br class="">Mike<br class=""><br class=""></span><o:p class=""></o:p></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">-----Original Message-----<br class="">From:<span class="apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a><span class="apple-converted-space"> </span><<a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>> On<br class="">Behalf Of Vitaly Cheptsov<br class="">Sent: Thursday, May 14, 2020 10:39 AM<br class="">To: Kinney, Michael D <<a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">michael.d.kinney@intel.com</a>><br class="">Cc:<span class="apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>; Andrew Fish<br class=""><<a href="mailto:afish@apple.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">afish@apple.com</a>>; Ard Biesheuvel<br class=""><<a href="mailto:ard.biesheuvel@linaro.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">ard.biesheuvel@linaro.org</a>>; Bret Barkelew<br class=""><<a href="mailto:bret.barkelew@microsoft.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">bret.barkelew@microsoft.com</a>>; Brian J . Johnson<br class=""><<a href="mailto:brian.johnson@hpe.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">brian.johnson@hpe.com</a>>; Chiu, Chasel<br class=""><<a href="mailto:chasel.chiu@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">chasel.chiu@intel.com</a>>; Justen, Jordan L<br class=""><<a href="mailto:jordan.l.justen@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">jordan.l.justen@intel.com</a>>; Laszlo Ersek<br class=""><<a href="mailto:lersek@redhat.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lersek@redhat.com</a>>; Leif Lindholm <<a href="mailto:leif@nuviainc.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">leif@nuviainc.com</a>>;<br class="">Gao, Liming <<a href="mailto:liming.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">liming.gao@intel.com</a>>; Marvin Häuser<br class=""><<a href="mailto:mhaeuser@outlook.de" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mhaeuser@outlook.de</a>>; Zimmer, Vincent<br class=""><<a href="mailto:vincent.zimmer@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">vincent.zimmer@intel.com</a>>; Gao, Zhichao<br class=""><<a href="mailto:zhichao.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">zhichao.gao@intel.com</a>><br class="">Subject: Re: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix<br class="">SafeString performing assertions on runtime checks<br class=""><br class="">Mike,<br class=""><br class="">Firstly, NULL check and odd-address checks are<br class="">essentially different things:<br class="">— NULL address is basically «no object», «optional<br class="">argument» (e.g. failed allocation).<br class="">— Odd address is memory corruption, as there is no way<br class="">to craft such address anyhow else.<br class="">For this reason the implementation is allowed to treat<br class="">them differently.<br class=""><br class="">Secondly, as I said in my cover letter there is no<br class="">behaviour change here for RELEASE builds. Behaviour<br class="">changes unrelated to the bugfix will have to go to a<br class="">separate patch. I agree that we may want to reconsider<br class="">the interface in the future, but that’s for a separate<br class="">bugzilla and patch. Not discussing it currently is<br class="">important to avoid diverting from the primary problem.<br class="">Could create a bugzilla not to forget about it soon<br class="">after the stable tag.<br class=""><br class="">Best wishes,<br class="">Vitaly<br class=""><br class=""><o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">14 мая 2020 г., в 19:38, Kinney, Michael D<o:p class=""></o:p></span></div></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><<a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">michael.d.kinney@intel.com</a>> написал(а):<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class="">Why preserve the ASSERT()s for an a Unicode strings<br class="">that are not aligned in a 16-bit boundary?<br class=""><br class="">This is essentially the same as an invalid pointer<o:p class=""></o:p></span></div></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">value<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">just like NULL.  If NULL pointer returns an error<o:p class=""></o:p></span></div></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">code,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">shouldn't and invalid pointer value?<br class=""><br class="">Thanks,<br class=""><br class="">Mike<br class=""><br class=""><o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">-----Original Message-----<br class="">From:<span class="Apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a><span class="Apple-converted-space"> </span><<a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a>> On<br class="">Behalf Of Vitaly Cheptsov<br class="">Sent: Thursday, May 14, 2020 2:26 AM<br class="">To:<span class="Apple-converted-space"> </span><a href="mailto:devel@edk2.groups.io" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">devel@edk2.groups.io</a><br class="">Cc: Andrew Fish <<a href="mailto:afish@apple.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">afish@apple.com</a>>; Ard Biesheuvel<br class=""><<a href="mailto:ard.biesheuvel@linaro.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">ard.biesheuvel@linaro.org</a>>; Bret Barkelew<br class=""><<a href="mailto:bret.barkelew@microsoft.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">bret.barkelew@microsoft.com</a>>; Brian J . Johnson<br class=""><<a href="mailto:brian.johnson@hpe.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">brian.johnson@hpe.com</a>>; Chiu, Chasel<br class=""><<a href="mailto:chasel.chiu@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">chasel.chiu@intel.com</a>>; Justen, Jordan L<br class=""><<a href="mailto:jordan.l.justen@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">jordan.l.justen@intel.com</a>>; Laszlo Ersek<br class=""><<a href="mailto:lersek@redhat.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lersek@redhat.com</a>>; Leif Lindholm<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><<a href="mailto:leif@nuviainc.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">leif@nuviainc.com</a>>;<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Gao, Liming <<a href="mailto:liming.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">liming.gao@intel.com</a>>; Marvin Häuser<br class=""><<a href="mailto:mhaeuser@outlook.de" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mhaeuser@outlook.de</a>>; Kinney, Michael D<br class=""><<a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">michael.d.kinney@intel.com</a>>; Zimmer, Vincent<br class=""><<a href="mailto:vincent.zimmer@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">vincent.zimmer@intel.com</a>>; Gao, Zhichao<br class=""><<a href="mailto:zhichao.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">zhichao.gao@intel.com</a>><br class="">Subject: [edk2-devel] [PATCH V6 1/1] MdePkg: Fix<br class="">SafeString performing assertions on runtime checks<br class=""><br class="">REF:<br class=""><a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2054&data=02%7C01%7CBret.Barkelew%40microsoft.com%7C854c0200e7ed412219a008d7f84ad4e5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637250872617792374&sdata=obXC2njAL18GchcPz1HyiGBSNcBYk8i2Q0ZhWDwICCQ%3D&reserved=0" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">https://bugzilla.tianocore.org/show_bug.cgi?id=2054</a><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">Runtime checks returned via status return code<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">should<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">not work as<br class=""><br class=""><br class="">assertions to permit parsing not trusted data with<br class="">SafeString<br class=""><br class=""><br class="">interfaces.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">CC: Andrew Fish <<a href="mailto:afish@apple.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">afish@apple.com</a>><br class=""><br class=""><br class="">CC: Ard Biesheuvel <<a href="mailto:ard.biesheuvel@linaro.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">ard.biesheuvel@linaro.org</a>><br class=""><br class=""><br class="">CC: Bret Barkelew <<a href="mailto:bret.barkelew@microsoft.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">bret.barkelew@microsoft.com</a>><br class=""><br class=""><br class="">CC: Brian J. Johnson <<a href="mailto:brian.johnson@hpe.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">brian.johnson@hpe.com</a>><br class=""><br class=""><br class="">CC: Chasel Chiu <<a href="mailto:chasel.chiu@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">chasel.chiu@intel.com</a>><br class=""><br class=""><br class="">CC: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">jordan.l.justen@intel.com</a>><br class=""><br class=""><br class="">CC: Laszlo Ersek <<a href="mailto:lersek@redhat.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lersek@redhat.com</a>><br class=""><br class=""><br class="">CC: Leif Lindholm <<a href="mailto:leif@nuviainc.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">leif@nuviainc.com</a>><br class=""><br class=""><br class="">CC: Liming Gao <<a href="mailto:liming.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">liming.gao@intel.com</a>><br class=""><br class=""><br class="">CC: Marvin Häuser <<a href="mailto:mhaeuser@outlook.de" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">mhaeuser@outlook.de</a>><br class=""><br class=""><br class="">CC: Mike Kinney <<a href="mailto:michael.d.kinney@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">michael.d.kinney@intel.com</a>><br class=""><br class=""><br class="">CC: Vincent Zimmer <<a href="mailto:vincent.zimmer@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">vincent.zimmer@intel.com</a>><br class=""><br class=""><br class="">CC: Zhichao Gao <<a href="mailto:zhichao.gao@intel.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">zhichao.gao@intel.com</a>><br class=""><br class=""><br class="">Signed-off-by: Vitaly Cheptsov<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><<a href="mailto:vit9696@protonmail.com" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">vit9696@protonmail.com</a>><o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br class="">---<br class=""><br class=""><br class="">MdePkg/Include/Library/BaseLib.h    | 120 ++--------<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">--<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">--------<br class=""><br class=""><br class="">MdePkg/Library/BaseLib/SafeString.c |  80 ----------<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">--<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">-<br class=""><br class=""><br class="">2 files changed, 7 insertions(+), 193 deletions(-)<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">diff --git a/MdePkg/Include/Library/BaseLib.h<br class="">b/MdePkg/Include/Library/BaseLib.h<br class=""><br class=""><br class="">index ecadff8b23..62dc3151bc 100644<br class=""><br class=""><br class="">--- a/MdePkg/Include/Library/BaseLib.h<br class=""><br class=""><br class="">+++ b/MdePkg/Include/Library/BaseLib.h<br class=""><br class=""><br class="">@@ -189,7 +189,6 @@ StrnSizeS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -225,7 +224,6 @@ StrCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Length > 0 and Destination is not aligned on a<br class="">16-bit boundary, then ASSERT().<br class=""><br class=""><br class=""> If Length > 0 and Source is not aligned on a 16-<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">bit<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary, then ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -263,7 +261,6 @@ StrnCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -303,7 +300,6 @@ StrCatS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -350,12 +346,7 @@ StrnCatS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -406,12 +397,7 @@ StrDecimalToUintnS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -467,12 +453,7 @@ StrDecimalToUint64S (<br class=""><br class=""><br class=""> the first character that is a not a valid<br class="">hexadecimal character or NULL,<br class=""><br class=""><br class=""> whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -528,12 +509,7 @@ StrHexToUintnS (<br class=""><br class=""><br class=""> the first character that is a not a valid<br class="">hexadecimal character or NULL,<br class=""><br class=""><br class=""> whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -622,8 +598,6 @@ AsciiStrnSizeS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> This function is similar as strcpy_s defined in<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">C11.<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Destination              A pointer to a<br class="">Null-terminated Ascii string.<br class=""><br class=""><br class="">@@ -656,8 +630,6 @@ AsciiStrCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> This function is similar as strncpy_s defined in<br class="">C11.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Destination              A pointer to a<br class="">Null-terminated Ascii string.<br class=""><br class=""><br class="">@@ -692,8 +664,6 @@ AsciiStrnCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> This function is similar as strcat_s defined in<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">C11.<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Destination              A pointer to a<br class="">Null-terminated Ascii string.<br class=""><br class=""><br class="">@@ -730,8 +700,6 @@ AsciiStrCatS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> This function is similar as strncat_s defined in<br class="">C11.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Destination              A pointer to a<br class="">Null-terminated Ascii string.<br class=""><br class=""><br class="">@@ -777,12 +745,6 @@ AsciiStrnCatS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINTN, then<br class=""><br class=""><br class="">@@ -832,12 +794,6 @@ AsciiStrDecimalToUintnS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINT64, then<br class=""><br class=""><br class="">@@ -891,12 +847,6 @@ AsciiStrDecimalToUint64S (<br class=""><br class=""><br class=""> character that is a not a valid hexadecimal<br class="">character or Null-terminator,<br class=""><br class=""><br class=""> whichever on comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINTN, then<br class=""><br class=""><br class="">@@ -950,12 +900,6 @@ AsciiStrHexToUintnS (<br class=""><br class=""><br class=""> character that is a not a valid hexadecimal<br class="">character or Null-terminator,<br class=""><br class=""><br class=""> whichever on comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINT64, then<br class=""><br class=""><br class="">@@ -1506,16 +1450,8 @@ StrHexToUint64 (<br class=""><br class=""><br class=""> "::" can be used to compress one or more groups of<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">X<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">when X contains only 0.<br class=""><br class=""><br class=""> The "::" can only appear once in the String.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Address is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If EndPointer is not NULL and Address is<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">translated<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">from String, a pointer<br class=""><br class=""><br class=""> to the character that stopped the scan is stored<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">at<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the location pointed to<br class=""><br class=""><br class=""> by EndPointer.<br class=""><br class=""><br class="">@@ -1567,15 +1503,10 @@ StrToIpv6Address (<br class=""><br class=""><br class=""> When /P is in the String, the function stops at<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">first character that is not<br class=""><br class=""><br class=""> a valid decimal digit character after P is<br class="">converted.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Address is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class=""> PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If EndPointer is not NULL and Address is<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">translated<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">from String, a pointer<br class=""><br class=""><br class=""> to the character that stopped the scan is stored<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">at<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the location pointed to<br class=""><br class=""><br class="">@@ -1640,8 +1571,6 @@ StrToIpv4Address (<br class=""><br class=""><br class="">                 oo          Data4[48:55]<br class=""><br class=""><br class="">                 pp          Data4[56:63]<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Guid is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  String                   Pointer to a<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Null-<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">terminated Unicode string.<br class=""><br class=""><br class="">@@ -1676,17 +1605,6 @@ StrToGuid (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Buffer is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Length is not multiple of 2, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero and<br class="">Length is greater than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If MaxBufferSize is less than (Length / 2), then<br class="">ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> @param  String                   Pointer to a<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Null-<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">terminated Unicode string.<br class=""><br class=""><br class=""> @param  Length                   The number of<br class="">Unicode characters to decode.<br class=""><br class=""><br class=""> @param  Buffer                   Pointer to the<br class="">converted bytes array.<br class=""><br class=""><br class="">@@ -1777,7 +1695,6 @@ UnicodeStrToAsciiStr (<br class=""><br class=""><br class=""> the upper 8 bits, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -1818,22 +1735,23 @@ UnicodeStrToAsciiStrS (<br class=""><br class=""><br class=""> bits of each Unicode character. The function<br class="">terminates the Ascii string<br class=""><br class=""><br class=""> Destination by appending a Null-terminator<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">character<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">at the end.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  The caller is responsible to make sure<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Destination<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">points to a buffer with size<br class=""><br class=""><br class="">-  equal or greater than ((StrLen (Source) + 1) *<br class="">sizeof (CHAR8)) in bytes.<br class=""><br class=""><br class="">+  The caller is responsible to make sure<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Destination<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">points to a buffer with<br class=""><br class=""><br class="">+  size not smaller than ((MIN(StrLen(Source),<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Length)<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">+ 1) * sizeof (CHAR8))<br class=""><br class=""><br class="">+  in bytes.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If any Unicode characters in Source contain non-<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">zero<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">value in the upper 8<br class=""><br class=""><br class=""> bits, then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class="">+  If an error is returned, then Destination and<br class="">DestinationLength are<br class=""><br class=""><br class="">+  unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Source             The pointer to a Null-<br class="">terminated Unicode string.<br class=""><br class=""><br class=""> @param  Length             The maximum number of<br class="">Unicode characters to<br class=""><br class=""><br class="">                            convert.<br class=""><br class=""><br class=""> @param  Destination        The pointer to a Null-<br class="">terminated Ascii string.<br class=""><br class=""><br class="">-  @param  DestMax            The maximum number of<br class="">Destination Ascii<br class=""><br class=""><br class="">-                             char, including<br class="">terminating null char.<br class=""><br class=""><br class="">+  @param  DestMax            The maximum number of<br class="">Destination Ascii char,<br class=""><br class=""><br class="">+                             including terminating<br class="">null char.<br class=""><br class=""><br class=""> @param  DestinationLength  The number of Unicode<br class="">characters converted.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @retval RETURN_SUCCESS            String is<br class="">converted.<br class=""><br class=""><br class="">@@ -2388,10 +2306,6 @@ AsciiStrHexToUint64 (<br class=""><br class=""><br class=""> "::" can be used to compress one or more groups of<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">X<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">when X contains only 0.<br class=""><br class=""><br class=""> The "::" can only appear once in the String.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Address is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If EndPointer is not NULL and Address is<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">translated<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">from String, a pointer<br class=""><br class=""><br class=""> to the character that stopped the scan is stored<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">at<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the location pointed to<br class=""><br class=""><br class=""> by EndPointer.<br class=""><br class=""><br class="">@@ -2443,10 +2357,6 @@ AsciiStrToIpv6Address (<br class=""><br class=""><br class=""> When /P is in the String, the function stops at<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">first character that is not<br class=""><br class=""><br class=""> a valid decimal digit character after P is<br class="">converted.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Address is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If EndPointer is not NULL and Address is<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">translated<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">from String, a pointer<br class=""><br class=""><br class=""> to the character that stopped the scan is stored<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">at<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the location pointed to<br class=""><br class=""><br class=""> by EndPointer.<br class=""><br class=""><br class="">@@ -2508,9 +2418,6 @@ AsciiStrToIpv4Address (<br class=""><br class=""><br class="">                 oo          Data4[48:55]<br class=""><br class=""><br class="">                 pp          Data4[56:63]<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Guid is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> @param  String                   Pointer to a<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Null-<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">terminated ASCII string.<br class=""><br class=""><br class=""> @param  Guid                     Pointer to the<br class="">converted GUID.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -2541,17 +2448,6 @@ AsciiStrToGuid (<br class=""><br class=""><br class=""> decoding stops after Length of characters and<br class="">outputs Buffer containing<br class=""><br class=""><br class=""> (Length / 2) bytes.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Buffer is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Length is not multiple of 2, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero and<br class="">Length is greater than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If MaxBufferSize is less than (Length / 2), then<br class="">ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> @param  String                   Pointer to a<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Null-<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">terminated ASCII string.<br class=""><br class=""><br class=""> @param  Length                   The number of<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASCII<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">characters to decode.<br class=""><br class=""><br class=""> @param  Buffer                   Pointer to the<br class="">converted bytes array.<br class=""><br class=""><br class="">@@ -2632,7 +2528,6 @@ AsciiStrToUnicodeStr (<br class=""><br class=""><br class=""> equal or greater than ((AsciiStrLen (Source) + 1)<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">*<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">sizeof (CHAR16)) in bytes.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -2678,7 +2573,6 @@ AsciiStrToUnicodeStrS (<br class=""><br class=""><br class=""> ((MIN(AsciiStrLen(Source), Length) + 1) * sizeof<br class="">(CHAR8)) in bytes.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then Destination and<br class="">DestinationLength are<br class=""><br class=""><br class=""> unmodified.<br class=""><br class=""><br class="">diff --git a/MdePkg/Library/BaseLib/SafeString.c<br class="">b/MdePkg/Library/BaseLib/SafeString.c<br class=""><br class=""><br class="">index 7dc03d2caa..1db42abb05 100644<br class=""><br class=""><br class="">--- a/MdePkg/Library/BaseLib/SafeString.c<br class=""><br class=""><br class="">+++ b/MdePkg/Library/BaseLib/SafeString.c<br class=""><br class=""><br class="">@@ -14,7 +14,6 @@<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">#define SAFE_STRING_CONSTRAINT_CHECK(Expression,<br class="">Status)  \<br class=""><br class=""><br class=""> do { \<br class=""><br class=""><br class="">-    ASSERT (Expression); \<br class=""><br class=""><br class="">   if (!(Expression)) { \<br class=""><br class=""><br class="">     return Status; \<br class=""><br class=""><br class="">   } \<br class=""><br class=""><br class="">@@ -197,7 +196,6 @@ StrnSizeS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -279,7 +277,6 @@ StrCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Length > 0 and Destination is not aligned on a<br class="">16-bit boundary, then ASSERT().<br class=""><br class=""><br class=""> If Length > 0 and Source is not aligned on a 16-<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">bit<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary, then ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -372,7 +369,6 @@ StrnCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -473,7 +469,6 @@ StrCatS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -590,12 +585,7 @@ StrnCatS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -705,12 +695,7 @@ StrDecimalToUintnS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -825,12 +810,7 @@ StrDecimalToUint64S (<br class=""><br class=""><br class=""> the first character that is a not a valid<br class="">hexadecimal character or NULL,<br class=""><br class=""><br class=""> whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -956,12 +936,7 @@ StrHexToUintnS (<br class=""><br class=""><br class=""> the first character that is a not a valid<br class="">hexadecimal character or NULL,<br class=""><br class=""><br class=""> whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class=""> If String is not aligned in a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumUnicodeStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumUnicodeStringLength Unicode characters,<br class="">not including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class="">@@ -1856,8 +1831,6 @@ AsciiStrCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> This function is similar as strncpy_s defined in<br class="">C11.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Destination              A pointer to a<br class="">Null-terminated Ascii string.<br class=""><br class=""><br class="">@@ -1944,8 +1917,6 @@ AsciiStrnCpyS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> This function is similar as strcat_s defined in<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">C11.<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Destination              A pointer to a<br class="">Null-terminated Ascii string.<br class=""><br class=""><br class="">@@ -2040,8 +2011,6 @@ AsciiStrCatS (<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> This function is similar as strncat_s defined in<br class="">C11.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> @param  Destination              A pointer to a<br class="">Null-terminated Ascii string.<br class=""><br class=""><br class="">@@ -2154,12 +2123,6 @@ AsciiStrnCatS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINTN, then<br class=""><br class=""><br class="">@@ -2266,12 +2229,6 @@ AsciiStrDecimalToUintnS (<br class=""><br class=""><br class=""> be ignored. Then, the function stops at the first<br class="">character that is a not a<br class=""><br class=""><br class=""> valid decimal character or a Null-terminator,<br class="">whichever one comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid decimal digits in the above<br class="">format, then 0 is stored<br class=""><br class=""><br class=""> at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINT64, then<br class=""><br class=""><br class="">@@ -2382,12 +2339,6 @@ AsciiStrDecimalToUint64S (<br class=""><br class=""><br class=""> character that is a not a valid hexadecimal<br class="">character or Null-terminator,<br class=""><br class=""><br class=""> whichever on comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINTN, then<br class=""><br class=""><br class="">@@ -2509,12 +2460,6 @@ AsciiStrHexToUintnS (<br class=""><br class=""><br class=""> character that is a not a valid hexadecimal<br class="">character or Null-terminator,<br class=""><br class=""><br class=""> whichever on comes first.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Data is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero, and<br class="">String contains more than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength Ascii characters, not<br class="">including the<br class=""><br class=""><br class="">-  Null-terminator, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If String has no valid hexadecimal digits in the<br class="">above format, then 0 is<br class=""><br class=""><br class=""> stored at the location pointed to by Data.<br class=""><br class=""><br class=""> If the number represented by String exceeds the<br class="">range defined by UINT64, then<br class=""><br class=""><br class="">@@ -2635,7 +2580,6 @@ AsciiStrHexToUint64S (<br class=""><br class=""><br class=""> the upper 8 bits, then ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then the Destination is<br class="">unmodified.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -2735,7 +2679,6 @@ UnicodeStrToAsciiStrS (<br class=""><br class=""><br class=""> If any Unicode characters in Source contain non-<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">zero<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">value in the upper 8<br class=""><br class=""><br class=""> bits, then ASSERT().<br class=""><br class=""><br class=""> If Source is not aligned on a 16-bit boundary,<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then Destination and<br class="">DestinationLength are<br class=""><br class=""><br class=""> unmodified.<br class=""><br class=""><br class="">@@ -2948,7 +2891,6 @@ AsciiStrToUnicodeStrS (<br class=""><br class=""><br class=""> ((MIN(AsciiStrLen(Source), Length) + 1) * sizeof<br class="">(CHAR8)) in bytes.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If Destination is not aligned on a 16-bit<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">boundary,<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">then ASSERT().<br class=""><br class=""><br class="">-  If an error would be returned, then the function<br class="">will also ASSERT().<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""> If an error is returned, then Destination and<br class="">DestinationLength are<br class=""><br class=""><br class=""> unmodified.<br class=""><br class=""><br class="">@@ -3072,10 +3014,6 @@ AsciiStrnToUnicodeStrS (<br class=""><br class=""><br class=""> "::" can be used to compress one or more groups of<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">X<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">when X contains only 0.<br class=""><br class=""><br class=""> The "::" can only appear once in the String.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Address is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If EndPointer is not NULL and Address is<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">translated<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">from String, a pointer<br class=""><br class=""><br class=""> to the character that stopped the scan is stored<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">at<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the location pointed to<br class=""><br class=""><br class=""> by EndPointer.<br class=""><br class=""><br class="">@@ -3291,10 +3229,6 @@ AsciiStrToIpv6Address (<br class=""><br class=""><br class=""> When /P is in the String, the function stops at<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">first character that is not<br class=""><br class=""><br class=""> a valid decimal digit character after P is<br class="">converted.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Address is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> If EndPointer is not NULL and Address is<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">translated<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">from String, a pointer<br class=""><br class=""><br class=""> to the character that stopped the scan is stored<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">at<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">the location pointed to<br class=""><br class=""><br class=""> by EndPointer.<br class=""><br class=""><br class="">@@ -3448,9 +3382,6 @@ AsciiStrToIpv4Address (<br class=""><br class=""><br class="">                 oo          Data4[48:55]<br class=""><br class=""><br class="">                 pp          Data4[56:63]<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-  If Guid is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> @param  String                   Pointer to a<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Null-<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">terminated ASCII string.<br class=""><br class=""><br class=""> @param  Guid                     Pointer to the<br class="">converted GUID.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">@@ -3550,17 +3481,6 @@ AsciiStrToGuid (<br class=""><br class=""><br class=""> decoding stops after Length of characters and<br class="">outputs Buffer containing<br class=""><br class=""><br class=""> (Length / 2) bytes.<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-  If String is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Buffer is NULL, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If Length is not multiple of 2, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If PcdMaximumAsciiStringLength is not zero and<br class="">Length is greater than<br class=""><br class=""><br class="">-  PcdMaximumAsciiStringLength, then ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class="">-  If MaxBufferSize is less than (Length / 2), then<br class="">ASSERT().<br class=""><br class=""><br class="">-<br class=""><br class=""><br class=""> @param  String                   Pointer to a<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">Null-<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">terminated ASCII string.<br class=""><br class=""><br class=""> @param  Length                   The number of<o:p class=""></o:p></span></div></blockquote></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">ASCII<o:p class=""></o:p></span></p><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class="">characters to decode.<br class=""><br class=""><br class=""> @param  Buffer                   Pointer to the<br class="">converted bytes array.<br class=""><br class=""><br class="">--<br class=""><br class=""><br class="">2.24.2 (Apple Git-127)<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><o:p class=""></o:p></span></p></blockquote><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""> </o:p></span></div></blockquote><p class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 9pt; font-family: Helvetica, sans-serif;" class=""><o:p class=""> </o:p></span></p></blockquote></div></blockquote></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""></o:p></span></div></div></div></div></blockquote></div><br class=""></div></body></html>

<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>


You receive all messages sent to this group.



<p>

<a target="_blank" href="https://edk2.groups.io/g/devel/message/59669">View/Reply Online (#59669)</a> |


  


|


  
    <a target="_blank" href="https://groups.io/mt/74223854/1813853">Mute This Topic</a>
  

| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>



<br>

<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>