diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-15 02:43:07 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-15 02:43:07 +0000 |
commit | 328ce03e55c2d802e1c83739d51c54bbcc92d87b (patch) | |
tree | 000714485313a4dbb535258ac81d2508c1375e4a | |
parent | 21e3aefed2b24a3875a2d056164e46677089e4bb (diff) | |
download | edk2-328ce03e55c2d802e1c83739d51c54bbcc92d87b.zip edk2-328ce03e55c2d802e1c83739d51c54bbcc92d87b.tar.gz edk2-328ce03e55c2d802e1c83739d51c54bbcc92d87b.tar.bz2 |
Add code check to avoid access violation.
Signed-off-by: ydong10
Reviewed-by: rsun3
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13014 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c | 1 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index 16fd793..476c8b3 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -544,6 +544,7 @@ CoreDispatcher ( &DriverEntry->ImageHandle,
sizeof (DriverEntry->ImageHandle)
);
+ ASSERT (DriverEntry->ImageHandle != NULL);
Status = CoreStartImage (DriverEntry->ImageHandle, NULL, NULL);
diff --git a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c index 27e9f9e..f44310f 100644 --- a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c +++ b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c @@ -640,6 +640,7 @@ CoreProcessFirmwareVolume ( // somehow.
//
if (!EFI_ERROR(Status)) {
+ ASSERT (*FVProtocolHandle != NULL);
Ptr = NULL;
Status = CoreHandleProtocol (*FVProtocolHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **) &Ptr);
if (EFI_ERROR(Status) || (Ptr == NULL)) {
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c index 331f9d8..0853f98 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c @@ -403,6 +403,7 @@ IScsiReceiveLoginRsp ( //
// A Login Response is received, process it.
//
+ ASSERT (Pdu != NULL);
Status = IScsiProcessLoginRsp (Conn, Pdu);
NetbufFree (Pdu);
|