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>
This commit is contained in:
Zhang Lubo 2017-03-16 15:06:41 +08:00 committed by Jiaxin Wu
parent f1222593f2
commit 962e62bcd8
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}
/**