diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-26 08:53:27 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-26 08:53:27 +0000 |
commit | d2fbaaab17945b59ca66bcd2f72e26ba3361e1d0 (patch) | |
tree | 29fa29d32bdbd1a34dd97ed53da9496478063a7f /MdeModulePkg/Core/Dxe/Hand | |
parent | 4ccd9566c12b90ed60c38ca7cf4156ee83861db1 (diff) | |
download | edk2-d2fbaaab17945b59ca66bcd2f72e26ba3361e1d0.zip edk2-d2fbaaab17945b59ca66bcd2f72e26ba3361e1d0.tar.gz edk2-d2fbaaab17945b59ca66bcd2f72e26ba3361e1d0.tar.bz2 |
Add more code robustness check for modules under MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10108 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Hand')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Hand/Locate.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c index 71676d0..56050a1 100644 --- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c +++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c @@ -1,7 +1,7 @@ /** @file
Support functions to connect/disconnect UEFI Driver model Protocol
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -766,7 +766,7 @@ CoreDisconnectController ( &gEfiDriverBindingProtocolGuid,
(VOID **)&DriverBinding
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || DriverBinding == NULL) {
Status = EFI_INVALID_PARAMETER;
goto Done;
}
diff --git a/MdeModulePkg/Core/Dxe/Hand/Locate.c b/MdeModulePkg/Core/Dxe/Hand/Locate.c index 5a30c52..1a3fdbd 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Locate.c +++ b/MdeModulePkg/Core/Dxe/Hand/Locate.c @@ -1,7 +1,7 @@ /** @file
Locate handle functions
-Copyright (c) 2006 - 2009, Intel Corporation. <BR>
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -200,6 +200,7 @@ CoreLocateHandle ( return Status;
}
+ ASSERT (GetNext != NULL);
//
// Enumerate out the matching handles
//
@@ -246,6 +247,7 @@ CoreLocateHandle ( // If this is a search by register notify and a handle was
// returned, update the register notification position
//
+ ASSERT (SearchKey != NULL);
ProtNotify = SearchKey;
ProtNotify->Position = ProtNotify->Position->ForwardLink;
}
|