From 4d10ab79d771f6ad88f54db324a7ac184118ccf7 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Mon, 10 Oct 2011 20:36:44 +0000 Subject: [PATCH] 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 --- ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexEdit.c | 4 ++-- 1 file 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,