mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
ecae51177e
commit
4d10ab79d7
|
@ -189,7 +189,7 @@ ShellCommandRunHexEdit (
|
||||||
switch (WhatToDo) {
|
switch (WhatToDo) {
|
||||||
case FileTypeFileBuffer:
|
case FileTypeFileBuffer:
|
||||||
Status = HBufferImageRead (
|
Status = HBufferImageRead (
|
||||||
Name,
|
Name==NULL?L"":Name,
|
||||||
NULL,
|
NULL,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -203,7 +203,7 @@ ShellCommandRunHexEdit (
|
||||||
case FileTypeDiskBuffer:
|
case FileTypeDiskBuffer:
|
||||||
Status = HBufferImageRead (
|
Status = HBufferImageRead (
|
||||||
NULL,
|
NULL,
|
||||||
Name,
|
Name==NULL?L"":Name,
|
||||||
Offset,
|
Offset,
|
||||||
Size,
|
Size,
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Reference in New Issue