public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Wu, Hao A" <hao.a.wu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [PATCH] MdePkg/UefiFileHandleLib: Refine the check for valid Ascii character
Date: Mon, 9 Jan 2017 02:18:41 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6CAB60@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1483692589-31920-1-git-send-email-hao.a.wu@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Wu, Hao A
>Sent: Friday, January 06, 2017 4:50 PM
>To: edk2-devel@lists.01.org
>Cc: Wu, Hao A <hao.a.wu@intel.com>; Gao, Liming <liming.gao@intel.com>;
>Kinney, Michael D <michael.d.kinney@intel.com>
>Subject: [PATCH] MdePkg/UefiFileHandleLib: Refine the check for valid Ascii
>character
>
>The commit will check if bit 7 is set of an Ascii character to judge its
>validity.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Cc: Michael Kinney <michael.d.kinney@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Hao Wu <hao.a.wu@intel.com>
>---
> MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
>b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
>index daed0f4..57aad77 100644
>--- a/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
>+++ b/MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.c
>@@ -1,7 +1,7 @@
> /** @file
>   Provides interface to EFI_FILE_HANDLE functionality.
>
>-  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved. <BR>
>+  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved. <BR>
>   This program and the accompanying materials
>   are licensed and made available under the terms and conditions of the BSD
>License
>   which accompanies this distribution.  The full text of the license may be
>found at
>@@ -1138,7 +1138,7 @@ FileHandleWriteLine(
>     }
>     UnicodeStrToAsciiStrS (Buffer, AsciiBuffer, Size);
>     for (Index = 0; Index < Size; Index++) {
>-      if (!((AsciiBuffer[Index] >= 0) && (AsciiBuffer[Index] < 128))){
>+      if ((AsciiBuffer[Index] & BIT7) != 0) {
>         FreePool(AsciiBuffer);
>         return EFI_INVALID_PARAMETER;
>       }
>--
>1.9.5.msysgit.0



      reply	other threads:[~2017-01-09  2:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06  8:49 [PATCH] MdePkg/UefiFileHandleLib: Refine the check for valid Ascii character Hao Wu
2017-01-09  2:18 ` Gao, Liming [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=4A89E2EF3DFEDB4C8BFDE51014F606A14D6CAB60@shsmsx102.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