public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Carsey, Jaben" <jaben.carsey@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] Nt32Pkg/WinNtSimpleFileSystemDxe: Fix ASSERT() parsing '\'
Date: Tue, 10 Jan 2017 01:55:09 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B879945@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <CB6E33457884FA40993F35157061515C54B3DE3B@FMSMSX103.amr.corp.intel.com>

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks/Ray

> -----Original Message-----
> From: Carsey, Jaben
> Sent: Monday, January 9, 2017 11:42 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; edk2-
> devel@lists.01.org
> Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben <jaben.carsey@intel.com>
> Subject: RE: [Patch] Nt32Pkg/WinNtSimpleFileSystemDxe: Fix ASSERT()
> parsing '\'
> 
> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
> 
> > -----Original Message-----
> > From: Kinney, Michael D
> > Sent: Saturday, January 7, 2017 11:19 AM
> > To: edk2-devel@lists.01.org
> > Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Carsey, Jaben
> > <jaben.carsey@intel.com>; Kinney, Michael D
> > <michael.d.kinney@intel.com>
> > Subject: [Patch] Nt32Pkg/WinNtSimpleFileSystemDxe: Fix ASSERT() parsing
> '\'
> > Importance: High
> >
> > https://bugzilla.tianocore.org/show_bug.cgi?id=331
> >
> > If Nt32 is built using UEFI Shell from the ShellPkg sources, an
> > ASSERT() is generated when a single '\' character is entered at the shell
> prompt.
> >
> > The WinNtSimpleFileSystemDxe module GetNextFileNameToken()
> function
> > breaks a file path up into tokens, but it does not handle the case
> > where a FileName ends in a '\' character.
> > It returns an empty string instead of NULL.  The fix is to set
> > *FileName to NULL if the remaining file path is an empty string.
> >
> > Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> > Cc: Jaben Carsey <jaben.carsey@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> > ---
> >  Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c | 6
> ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c
> > b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c
> > index 6cff2df..5bb5832 100644
> > --- a/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c
> > +++ b/Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c
> > @@ -748,6 +748,12 @@ GetNextFileNameToken (
> >      // Point *FileName to the next character after L'\'.
> >      //
> >      *FileName = *FileName + Offset + 1;
> > +    //
> > +    // If *FileName is an empty string, then set *FileName to NULL
> > +    //
> > +    if (**FileName == L'\0') {
> > +      *FileName = NULL;
> > +    }
> >    }
> >
> >    return Token;
> > --
> > 2.6.3.windows.1



      reply	other threads:[~2017-01-10  1:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-07 19:19 [Patch] Nt32Pkg/WinNtSimpleFileSystemDxe: Fix ASSERT() parsing '\' Michael Kinney
2017-01-09 15:42 ` Carsey, Jaben
2017-01-10  1:55   ` Ni, Ruiyu [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=734D49CCEBEEF84792F5B80ED585239D5B879945@SHSMSX104.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