audk/ShellPkg/Library
Hao Wu d727614c91 ShellPkg/UefiShellLib: Avoid reading undefined content before string
https://bugzilla.tianocore.org/show_bug.cgi?id=566

In function InternalShellPrintWorker(), if the string in variable
'mPostReplaceFormat2' starts with character L'%', the following
expression:

*(ResumeLocation-1) == L'^' at line 2831

will read an undefined value before the starting of string
'mPostReplaceFormat2'.

This commit adds additional logic to avoid reading undefined content.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
2017-05-24 13:17:51 +08:00
..
UefiDpLib ShellPkg UefiDpLib: Handle "/" separator in debug path for GCC build 2017-03-16 11:08:48 +08:00
UefiHandleParsingLib ShellPkg/HandleParsingLib: Show LoadedImageProtocol file name 2017-05-11 19:14:44 +08:00
UefiShellBcfgCommandLib ShellPkg/UefiShellBcfgCommandLib: Fix VS2012 build failure 2017-03-15 10:03:23 +08:00
UefiShellCEntryLib ShellPkg: Fix typos in comments and variables 2016-11-15 11:05:34 +08:00
UefiShellCommandLib ShellPkg/ShellCommandLib: Update DumpHex to print {|}~ 2017-05-04 15:58:44 +08:00
UefiShellDebug1CommandsLib ShellPkg/memmap: Dump memory map information for all memory types 2017-05-12 10:50:51 +08:00
UefiShellDriver1CommandsLib ShellPkg: Refine type cast for pointer subtraction 2017-03-06 14:16:00 +08:00
UefiShellInstall1CommandsLib Revert "ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf" 2016-01-06 16:23:20 +00:00
UefiShellLevel1CommandsLib ShellPkg: Update sources to include MdePkg protocol definitions 2016-10-19 10:26:16 +08:00
UefiShellLevel2CommandsLib ShellPkg: Refine type cast for pointer subtraction 2017-03-06 14:16:00 +08:00
UefiShellLevel3CommandsLib ShellPkg: Add missing header line for SFO flag in 'cls' command 2016-12-09 09:32:51 +08:00
UefiShellLib ShellPkg/UefiShellLib: Avoid reading undefined content before string 2017-05-24 13:17:51 +08:00
UefiShellNetwork1CommandsLib ShellPkg: Add check logic for the gateway validity. 2017-01-19 11:32:14 +08:00
UefiShellNetwork2CommandsLib ShellPkg/Ifconfig6: Address ASSERT because of a missing NULL check 2017-01-13 09:40:48 +08:00
UefiShellTftpCommandLib ShellPkg: Update sources to include MdePkg protocol definitions 2016-10-19 10:26:16 +08:00