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 ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ConsoleLogger.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ConsoleWrappers.c ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ConsoleWrappers.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
FileHandleInternal.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
FileHandleWrappers.c ShellPkg: Fix a bug ">>v" cannot append data to environment variable 2017-01-06 20:46:41 +08:00
FileHandleWrappers.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
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 report line number for command errors in a script. 2016-05-12 08:15:00 -07:00
ShellEnvVar.c ShellPkg/Application: Fix ">v" cannot update environment variable 2016-12-09 09:26:28 +08:00
ShellEnvVar.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellManParser.c ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellManParser.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellParametersProtocol.c ShellPkg: Refine type cast for pointer subtraction 2017-03-06 14:16:00 +08:00
ShellParametersProtocol.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellProtocol.c ShellPkg/Shell: Avoid reading content beyond string boundary 2017-09-21 14:06:06 +08:00
ShellProtocol.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00