summaryrefslogtreecommitdiff
path: root/ShellPkg/Library
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-10 20:36:44 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-10 20:36:44 +0000
commit4d10ab79d771f6ad88f54db324a7ac184118ccf7 (patch)
treeec597106f20dce9cd619652b231eb860faf710e8 /ShellPkg/Library
parentecae51177e83db0d99f8b4888ae4b866c18651b6 (diff)
downloadedk2-platforms-4d10ab79d771f6ad88f54db324a7ac184118ccf7.tar.xz
ShellPkg: Add checks for NULL pointers.
This adds lots of pointer verification with ASSERTs only used when the condition should be impossible and never for memory allocation. signed-off-by: jcarsey reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12524 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
index edd2f67650..68074d4244 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c
@@ -189,7 +189,7 @@ ShellCommandRunHexEdit (
switch (WhatToDo) {
case FileTypeFileBuffer:
Status = HBufferImageRead (
- Name,
+ Name==NULL?L"":Name,
NULL,
0,
0,
@@ -203,7 +203,7 @@ ShellCommandRunHexEdit (
case FileTypeDiskBuffer:
Status = HBufferImageRead (
NULL,
- Name,
+ Name==NULL?L"":Name,
Offset,
Size,
0,