]> git.proxmox.com Git - mirror_edk2.git/commit
Nt32Pkg/WinNtSimpleFileSystemDxe: Fix ASSERT() parsing '\'
authorMichael Kinney <michael.d.kinney@intel.com>
Sat, 7 Jan 2017 19:13:32 +0000 (11:13 -0800)
committerMichael Kinney <michael.d.kinney@intel.com>
Tue, 10 Jan 2017 20:35:39 +0000 (12:35 -0800)
commit462a3eba8feaf3716d294111725742ff5aa08488
treec7a6c24e6a8aedaa399eb949402052c1a8f49f7f
parent0f705029d91559030bfa5f505daca57dcefd1a2e
Nt32Pkg/WinNtSimpleFileSystemDxe: Fix ASSERT() parsing '\'

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>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Nt32Pkg/WinNtSimpleFileSystemDxe/WinNtSimpleFileSystem.c