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:
@ -692,6 +692,7 @@ HttpUrlGetPort (
|
|||||||
{
|
{
|
||||||
CHAR8 *PortString;
|
CHAR8 *PortString;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
UINTN Data;
|
||||||
UINT32 ResultLength;
|
UINT32 ResultLength;
|
||||||
HTTP_URL_PARSER *Parser;
|
HTTP_URL_PARSER *Parser;
|
||||||
|
|
||||||
@ -722,7 +723,10 @@ HttpUrlGetPort (
|
|||||||
|
|
||||||
PortString[ResultLength] = '\0';
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user