If Source is not aligned on a 16-bit boundary, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
If Length > 0 and Destination is NULL, then ASSERT().\r
If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().\r
If Length > 0 and Source is NULL, then ASSERT().\r
- If Length > 0 and Source is not aligned on a 16-bit bounadry, then ASSERT().\r
+ If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
- Null-terminator, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,\r
+ and Length is greater than PcdMaximumUnicodeStringLength, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
ASSERT ((UINTN)(Destination - Source) > StrLen (Source));\r
ASSERT ((UINTN)(Source - Destination) >= Length);\r
\r
+ if (PcdGet32 (PcdMaximumUnicodeStringLength) != 0) {\r
+ ASSERT (Length <= PcdGet32 (PcdMaximumUnicodeStringLength));\r
+ }\r
+\r
ReturnValue = Destination;\r
\r
while ((*Source != L'\0') && (Length > 0)) {\r
If String is NULL, then ASSERT().\r
If String is not aligned on a 16-bit boundary, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
If String is NULL, then ASSERT().\r
If String is not aligned on a 16-bit boundary, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
If SecondString is NULL, then ASSERT().\r
If SecondString is not aligned on a 16-bit boundary, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated Unicode string.\r
subtracted from the first mismatched Unicode character in FirstString.\r
\r
If Length > 0 and FirstString is NULL, then ASSERT().\r
- If Length > 0 and FirstString is not aligned on a 16-bit bounadary, then ASSERT().\r
+ If Length > 0 and FirstString is not aligned on a 16-bit boundary, then ASSERT().\r
If Length > 0 and SecondString is NULL, then ASSERT().\r
- If Length > 0 and SecondString is not aligned on a 16-bit bounadary, then ASSERT().\r
+ If Length > 0 and SecondString is not aligned on a 16-bit boundary, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and FirstString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and SecondString contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters not including the\r
- Null-terminator, then ASSERT().\r
+ than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
+ Null-terminator, and Length is greater than PcdMaximumUnicodeStringLength,\r
+ then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated Unicode string.\r
@param SecondString Pointer to a Null-terminated Unicode string.\r
ASSERT (StrSize (FirstString) != 0);\r
ASSERT (StrSize (SecondString) != 0);\r
\r
+ if (PcdGet32 (PcdMaximumUnicodeStringLength) != 0) {\r
+ ASSERT (Length <= PcdGet32 (PcdMaximumUnicodeStringLength));\r
+ }\r
+\r
while ((*FirstString != L'\0') &&\r
(*FirstString == *SecondString) &&\r
(Length > 1)) {\r
results are undefined.\r
\r
If Destination is NULL, then ASSERT().\r
- If Destination is not aligned on a 16-bit bounadary, then ASSERT().\r
+ If Destination is not aligned on a 16-bit boundary, then ASSERT().\r
If Source is NULL, then ASSERT().\r
- If Source is not aligned on a 16-bit bounadary, then ASSERT().\r
+ If Source is not aligned on a 16-bit boundary, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Destination contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination\r
and Source results in a Unicode string with more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Destination contains more\r
- than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ than PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
If PcdMaximumUnicodeStringLength is not zero, and concatenating Destination\r
and Source results in a Unicode string with more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the\r
- Null-terminator, then ASSERT().\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the\r
+ Null-terminator, and Length is greater than PcdMaximumUnicodeStringLength,\r
+ then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated Unicode string.\r
@param Source Pointer to a Null-terminated Unicode string.\r
\r
If PcdMaximumUnicodeStringLength is not zero, and SearchString\r
or String contains more than PcdMaximumUnicodeStringLength Unicode\r
- characters not including the Null-terminator, then ASSERT().\r
+ characters, not including the Null-terminator, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
@param SearchString Pointer to a Null-terminated Unicode string to search for.\r
to the range defined by UINTN, then ASSERT().\r
\r
If PcdMaximumUnicodeStringLength is not zero, and String contains\r
- more than PcdMaximumUnicodeStringLength Unicode characters not including\r
+ more than PcdMaximumUnicodeStringLength Unicode characters, not including\r
the Null-terminator, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
to the range defined by UINT64, then ASSERT().\r
\r
If PcdMaximumUnicodeStringLength is not zero, and String contains\r
- more than PcdMaximumUnicodeStringLength Unicode characters not including\r
+ more than PcdMaximumUnicodeStringLength Unicode characters, not including\r
the Null-terminator, then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
UINTN, then ASSERT().\r
\r
If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,\r
then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
}\r
\r
if (InternalCharToUpper (*String) == L'X') {\r
- ASSERT (*(String - 1) == L'0');\r
if (*(String - 1) != L'0') {\r
return 0;\r
}\r
UINT64, then ASSERT().\r
\r
If PcdMaximumUnicodeStringLength is not zero, and String contains more than\r
- PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator,\r
+ PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator,\r
then ASSERT().\r
\r
@param String Pointer to a Null-terminated Unicode string.\r
If Source and Destination overlap, then ASSERT().\r
\r
If PcdMaximumUnicodeStringLength is not zero, and Source contains\r
- more than PcdMaximumUnicodeStringLength Unicode characters not including\r
+ more than PcdMaximumUnicodeStringLength Unicode characters, not including\r
the Null-terminator, then ASSERT().\r
\r
If PcdMaximumAsciiStringLength is not zero, and Source contains more\r
- than PcdMaximumAsciiStringLength Unicode characters not including the\r
+ than PcdMaximumAsciiStringLength Unicode characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param Source Pointer to a Null-terminated Unicode string.\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
If Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
- then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
+ and Length is greater than PcdMaximumAsciiStringLength, then ASSERT().\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r
ASSERT ((UINTN)(Destination - Source) > AsciiStrLen (Source));\r
ASSERT ((UINTN)(Source - Destination) >= Length);\r
\r
+ if (PcdGet32 (PcdMaximumAsciiStringLength) != 0) {\r
+ ASSERT (Length <= PcdGet32 (PcdMaximumAsciiStringLength));\r
+ }\r
+\r
ReturnValue = Destination;\r
\r
while (*Source != 0 && Length > 0) {\r
If Length > 0 and Destination is NULL, then ASSERT().\r
If Length > 0 and Source is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and String contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
\r
@param String Pointer to a Null-terminated ASCII string.\r
\r
If String is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and String contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
\r
@param String Pointer to a Null-terminated ASCII string.\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters not including the\r
+ than PcdMaximumAsciiStringLength ASCII characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
If FirstString is NULL, then ASSERT().\r
If SecondString is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and SecondString contains more\r
- than PcdMaximumAsciiStringLength ASCII characters not including the\r
+ than PcdMaximumAsciiStringLength ASCII characters, not including the\r
Null-terminator, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
If Length > 0 and FirstString is NULL, then ASSERT().\r
If Length > 0 and SecondString is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and FirstString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and SecondString contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
- then ASSERT().\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
+ and Length is greater than PcdMaximumAsciiStringLength, then ASSERT().\r
\r
@param FirstString Pointer to a Null-terminated ASCII string.\r
@param SecondString Pointer to a Null-terminated ASCII string.\r
ASSERT (AsciiStrSize (FirstString));\r
ASSERT (AsciiStrSize (SecondString));\r
\r
+ if (PcdGet32 (PcdMaximumAsciiStringLength) != 0) {\r
+ ASSERT (Length <= PcdGet32 (PcdMaximumAsciiStringLength));\r
+ }\r
+\r
while ((*FirstString != '\0') &&\r
(*FirstString == *SecondString) &&\r
(Length > 1)) {\r
If Destination is NULL, then ASSERT().\r
If Source is NULL, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and Destination contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero and concatenating Destination and\r
Source results in a ASCII string with more than PcdMaximumAsciiStringLength\r
If Length > 0 and Source is NULL, then ASSERT().\r
If Source and Destination overlap, then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero, and Destination contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero, and Source contains more than\r
- PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator,\r
+ PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator,\r
then ASSERT().\r
If PcdMaximumAsciiStringLength is not zero, and concatenating Destination and\r
Source results in a ASCII string with more than PcdMaximumAsciiStringLength\r
- ASCII characters not including the Null-terminator, then ASSERT().\r
+ ASCII characters, not including the Null-terminator, and Length is greater than \r
+ PcdMaximumAsciiStringLength, then ASSERT()..\r
\r
@param Destination Pointer to a Null-terminated ASCII string.\r
@param Source Pointer to a Null-terminated ASCII string.\r