diff options
author | Zhang Lubo <lubo.zhang@intel.com> | 2017-03-16 15:06:41 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-03-17 10:14:24 +0800 |
commit | 962e62bcd84db8a684fb6f594b930726aa62b778 (patch) | |
tree | 89e5662e9bbf9a505f04bf7e4f4ac71167df7d52 /MdeModulePkg/Library/DxeHttpLib | |
parent | f1222593f2a8944ab8f61f3864b6ae80633faecf (diff) | |
download | edk2-962e62bcd84db8a684fb6f594b930726aa62b778.tar.gz edk2-962e62bcd84db8a684fb6f594b930726aa62b778.tar.bz2 edk2-962e62bcd84db8a684fb6f594b930726aa62b778.zip |
MdeModulePkg: Fix bug in DxeHttplib when converting port number.
Http boot on X64 platform is faild, this is caused by the incorrect
type conversion when getting port number from Url.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/DxeHttpLib')
-rw-r--r-- | MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c index ccc20ccf43..2ff04ffad3 100644 --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c @@ -692,6 +692,7 @@ HttpUrlGetPort ( {
CHAR8 *PortString;
EFI_STATUS Status;
+ UINTN Data;
UINT32 ResultLength;
HTTP_URL_PARSER *Parser;
@@ -722,7 +723,10 @@ HttpUrlGetPort ( PortString[ResultLength] = '\0';
- return AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, (UINTN *) Port);
+ Status = AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, &Data);
+
+ *Port = (UINT16) Data;
+ return Status;
}
/**
|