Reviewed-by: Ruiyu Ni <ruiyu...@intel.com> Thanks/Ray
> -----Original Message----- > From: Carsey, Jaben > Sent: Monday, January 9, 2017 11:42 PM > To: Kinney, Michael D <michael.d.kin...@intel.com>; edk2- > de...@lists.01.org > Cc: Ni, Ruiyu <ruiyu...@intel.com>; Carsey, Jaben <jaben.car...@intel.com> > Subject: RE: [Patch] Nt32Pkg/WinNtSimpleFileSystemDxe: Fix ASSERT() > parsing '\' > > Reviewed-by: Jaben Carsey <jaben.car...@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...@intel.com>; Carsey, Jaben > > <jaben.car...@intel.com>; Kinney, Michael D > > <michael.d.kin...@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...@intel.com> > > Cc: Jaben Carsey <jaben.car...@intel.com> > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Michael D Kinney <michael.d.kin...@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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel