diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-27 02:44:20 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-02-27 02:44:20 +0000 |
commit | 3dbef428c7b36b8ab709b44d790a7352af855e48 (patch) | |
tree | ee6509808011e2fb5dffcd7baff14c7f317c6e62 /MdePkg/Library/PeiExtractGuidedSectionLib | |
parent | 65cc57fc4162563c1f8367ed69db8274ea7cabdc (diff) | |
download | edk2-platforms-3dbef428c7b36b8ab709b44d790a7352af855e48.tar.xz |
Add code check to avoid access violation.
Signed-off-by:ydong10
Reviewed-by:lgao4
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13036 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiExtractGuidedSectionLib')
-rw-r--r-- | MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c index 1fad3d0c47..ffb11273bd 100644 --- a/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c +++ b/MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.c @@ -156,6 +156,7 @@ ExtractGuidedSectionGetGuidList ( //
// Get GuidTable and Table Number
//
+ ASSERT (HandlerInfo != NULL);
*ExtractHandlerGuidTable = HandlerInfo->ExtractHandlerGuidTable;
return HandlerInfo->NumberOfExtractHandler;
}
@@ -216,6 +217,7 @@ ExtractGuidedSectionRegisterHandlers ( //
// Search the match registered GetInfo handler for the input guided section.
//
+ ASSERT (HandlerInfo != NULL);
for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) {
if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionGuid)) {
//
@@ -317,6 +319,7 @@ ExtractGuidedSectionGetInfo ( //
// Search the match registered GetInfo handler for the input guided section.
//
+ ASSERT (HandlerInfo != NULL);
for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) {
if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionDefinitionGuid)) {
//
@@ -410,6 +413,7 @@ ExtractGuidedSectionDecode ( //
// Search the match registered Extract handler for the input guided section.
//
+ ASSERT (HandlerInfo != NULL);
for (Index = 0; Index < HandlerInfo->NumberOfExtractHandler; Index ++) {
if (CompareGuid (HandlerInfo->ExtractHandlerGuidTable + Index, SectionDefinitionGuid)) {
//
|