diff options
author | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-02-08 11:56:54 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-02-09 08:33:21 +0800 |
commit | 27fd61af01453b997ef1b79b91dfb7fa65d2e253 (patch) | |
tree | f43938bc21382660ef61edc7f6186a6c1da3f149 /MdeModulePkg | |
parent | 9fe9cf9acb475af9317dcdaf32a93f1cb77d95ac (diff) | |
download | edk2-platforms-27fd61af01453b997ef1b79b91dfb7fa65d2e253.tar.xz |
MdeModulePkg/DxeHttpLib: Correct the return status for the HTTP Port/ContentLength
Replace AsciiStrDecimalToUintn with AsciiStrDecimalToUintnS to
return the correct status for the HTTP Port/ContentLength.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c index 8734291ae3..ccc20ccf43 100644 --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c @@ -2,7 +2,7 @@ This library is used to share code between UEFI network stack modules.
It provides the helper routines to parse the HTTP message byte stream.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -721,9 +721,8 @@ HttpUrlGetPort ( }
PortString[ResultLength] = '\0';
- *Port = (UINT16) AsciiStrDecimalToUintn (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, (UINTN *) Port);
}
/**
@@ -932,8 +931,7 @@ HttpIoParseContentLengthHeader ( return EFI_NOT_FOUND;
}
- *ContentLength = AsciiStrDecimalToUintn (Header->FieldValue);
- return EFI_SUCCESS;
+ return AsciiStrDecimalToUintnS (Header->FieldValue, (CHAR8 **) NULL, ContentLength);
}
/**
|