audk/ShellPkg/Application/Shell
Hao Wu 8c3e4688e0 ShellPkg/Shell: Avoid reading content beyond string boundary
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=690

Within function EfiShellGetDevicePathFromFilePath(), when the input
parameter 'Path' string is like:
"FS0:"

It is possible for the below statement:
"if (*(Path+StrLen(MapName)+1) == CHAR_NULL) {"

to read the content 1 byte beyond the string boundary (both 'Path' and
'MapName' will be FS0: in this case).

This commit adds additional checks to avoid this.

Cc: Steven Shi <steven.shi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-09-21 14:06:06 +08:00
..
ConsoleLogger.c
ConsoleLogger.h
ConsoleWrappers.c
ConsoleWrappers.h
FileHandleInternal.h
FileHandleWrappers.c
FileHandleWrappers.h
Shell.c ShellPkg: Update CWD and current mapping when commands return 2017-08-30 11:42:52 +08:00
Shell.h ShellPkg/Shell: clean up bogus member types in SPLIT_LIST 2017-04-26 12:10:30 +02:00
Shell.inf ShellPkg: add GUID declaration for FILE_GUID of UEFI Shell app to package 2017-03-22 15:32:16 +00:00
Shell.uni
ShellEnvVar.c
ShellEnvVar.h
ShellManParser.c
ShellManParser.h
ShellParametersProtocol.c
ShellParametersProtocol.h
ShellProtocol.c ShellPkg/Shell: Avoid reading content beyond string boundary 2017-09-21 14:06:06 +08:00
ShellProtocol.h