}\r
}\r
\r
+ //\r
+ // Convert the string to IPv4 address. AsciiStrDecimalToUintn stops at the\r
+ // first character that is not a valid decimal character, '.' or '\0' here. \r
+ //\r
NodeVal = AsciiStrDecimalToUintn (TempStr);\r
if (NodeVal > 0xFF) {\r
return EFI_INVALID_PARAMETER;\r
Short = FALSE;\r
Update = FALSE;\r
\r
- for (Index = 0; (Index + 1) < 16; Index = (UINT8) (Index + 2)) {\r
+ for (Index = 0; Index < 15; Index = (UINT8) (Index + 2)) {\r
TempStr = Ip6Str;\r
\r
while ((*Ip6Str != '\0') && (*Ip6Str != ':')) {\r
} \r
\r
//\r
- // Convert the Str to IPv6 address.\r
+ // Convert the string to IPv6 address. AsciiStrHexToUintn stops at the first\r
+ // character that is not a valid hexadecimal character, ':' or '\0' here. \r
//\r
NodeVal = AsciiStrHexToUintn (TempStr);\r
if ((NodeVal > 0xFFFF) || (Index > 14)) {\r