audk/ShellPkg/Library/UefiShellLevel2CommandsLib
Ruiyu Ni 7506fe43a1 ShellPkg/rm: fix hang when deleting an absolutely-empty directory
An ordinary empty directory should contain "." and ".." entries.
When an empty directory even doesn't contain "." or ".." entry,
FileHandleFindFirstFile() may return error status and a NULL
FileInfo.
IsDirectoryEmpty() implementation in Rm.c doesn't consider this
case and the deference of FileInfo->FileName causes page fault
exception because FileInfo is NULL.
The patch checks the return status of FileHandleFindFirstFile()
to fix this issue.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2018-02-09 12:24:55 +08:00
..
Attrib.c ShellPkg: Standardized HP Copyright Message String 2015-02-04 22:25:01 +00:00
Cd.c ShellPkg/Level2Command: Use UnicodeCollation in StrinCmp 2018-01-29 09:41:48 +08:00
Cp.c ShellPkg/Level2Command: Use UnicodeCollation in StrinCmp 2018-01-29 09:41:48 +08:00
Load.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00
Ls.c ShellPkg/ls: Display the file time in local time. 2017-07-26 13:31:17 +08:00
Map.c ShellPkg/map: Fix out-of-bound read when "map fsn" 2018-02-06 17:31:16 +08:00
MkDir.c ShellPkg/mkdir: support creating nested directories 2017-08-21 10:42:39 +08:00
Mv.c ShellPkg/MV: Fix MV to deny moving parent of current directory 2016-12-05 09:18:32 +08:00
Parse.c ShellPkg/parse: Handle Unicode stream from pipe correctly 2017-06-07 08:51:41 +08:00
Reset.c ShellPkg/reset: Support "-fwui" flag 2016-11-07 10:43:27 +08:00
Rm.c ShellPkg/rm: fix hang when deleting an absolutely-empty directory 2018-02-09 12:24:55 +08:00
Set.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00
TimeDate.c ShellPkg/Level2Command: Use UnicodeCollation in StrinCmp 2018-01-29 09:41:48 +08:00
UefiShellLevel2CommandsLib.c ShellPkg/Level2Command: Use UnicodeCollation in StrinCmp 2018-01-29 09:41:48 +08:00
UefiShellLevel2CommandsLib.h ShellPkg/Level2Command: Use UnicodeCollation in StrinCmp 2018-01-29 09:41:48 +08:00
UefiShellLevel2CommandsLib.inf ShellPkg: Update Guid/Protocol usages in INF files. 2016-04-13 14:52:59 +08:00
UefiShellLevel2CommandsLib.uni Shell/mkdir: Modify the help content to align to spec. 2017-08-21 10:42:39 +08:00
Vol.c ShellPkg/UefiShellLevel2CommandsLib: Remove unnecessary EFIAPI 2016-10-09 10:27:49 +08:00