public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Jiaxin" <jiaxin.wu@intel.com>
To: "Zhang, Lubo" <lubo.zhang@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ye, Ting" <ting.ye@intel.com>, "Fu, Siyuan" <siyuan.fu@intel.com>
Subject: Re: [patch] MdeModulePkg: Fix bug in DxeHttplib when converting port number.
Date: Thu, 16 Mar 2017 07:12:33 +0000	[thread overview]
Message-ID: <895558F6EA4E3B41AC93A00D163B7274162A3ADB@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1489648127-6200-1-git-send-email-lubo.zhang@intel.com>

Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>

Thanks,
Jiaxin

> -----Original Message-----
> From: Zhang, Lubo
> Sent: Thursday, March 16, 2017 3:09 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu,
> Jiaxin <jiaxin.wu@intel.com>
> Subject: [patch] 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>
> ---
>  MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> index ccc20cc..2ff04ff 100644
> --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> @@ -690,10 +690,11 @@ HttpUrlGetPort (
>       OUT  UINT16             *Port
>    )
>  {
>    CHAR8         *PortString;
>    EFI_STATUS    Status;
> +  UINTN         Data;
>    UINT32        ResultLength;
>    HTTP_URL_PARSER      *Parser;
> 
>    if (Url == NULL || UrlParser == NULL || Port == NULL) {
>      return EFI_INVALID_PARAMETER;
> @@ -720,11 +721,14 @@ HttpUrlGetPort (
>      return Status;
>    }
> 
>    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;
>  }
> 
>  /**
>    Get the Path from a HTTP URL.
> 
> --
> 1.9.5.msysgit.1



      parent reply	other threads:[~2017-03-16  7:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16  7:08 [patch] MdeModulePkg: Fix bug in DxeHttplib when converting port number Zhang Lubo
2017-03-16  7:11 ` Fu, Siyuan
2017-03-16  7:12 ` Wu, Jiaxin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=895558F6EA4E3B41AC93A00D163B7274162A3ADB@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox