]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength
[mirror_edk2.git] / MdeModulePkg / Library / DxeHttpLib / DxeHttpLib.c
index 8734291ae32ddb944a40441a16810b7b9f7bd539..ccc20ccf43354a07c79b54555eb73b4b60602903 100644 (file)
@@ -2,7 +2,7 @@
   This library is used to share code between UEFI network stack modules.\r
   It provides the helper routines to parse the HTTP message byte stream.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -721,9 +721,8 @@ HttpUrlGetPort (
   }\r
 \r
   PortString[ResultLength] = '\0';\r
-  *Port = (UINT16) AsciiStrDecimalToUintn (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset);\r
 \r
-  return  EFI_SUCCESS;\r
+  return AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, (UINTN *) Port);\r
 }\r
 \r
 /**\r
@@ -932,8 +931,7 @@ HttpIoParseContentLengthHeader (
     return EFI_NOT_FOUND;\r
   }\r
 \r
-  *ContentLength = AsciiStrDecimalToUintn (Header->FieldValue);\r
-  return EFI_SUCCESS;\r
+  return AsciiStrDecimalToUintnS (Header->FieldValue, (CHAR8 **) NULL, ContentLength);\r
 }\r
 \r
 /**\r