Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix two bugs in GenFfs and GenSec tool to handle the different cases.
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1261 7335b38e-4728-0410-8992-fb3ffe349368
  • Loading branch information
lgao4 committed Jun 18, 2008
1 parent c91036d commit 8bff404
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Source/C/GenFfs/GenFfs.c
Expand Up @@ -334,7 +334,15 @@ Routine Description:
}
} else if (TempSectHeader.Type == EFI_SECTION_PE32) {
(*PESectionNum) ++;
} else if (TempSectHeader.Type == EFI_SECTION_COMPRESSION ||
TempSectHeader.Type == EFI_SECTION_GUID_DEFINED ||
TempSectHeader.Type == EFI_SECTION_FIRMWARE_VOLUME_IMAGE) {
//
// for the encapsulated section, assume it contains Pe/Te section
//
(*PESectionNum) ++;
}

fseek (InFile, 0, SEEK_SET);

//
Expand Down
4 changes: 4 additions & 0 deletions Source/C/GenSec/GenSec.c
Expand Up @@ -1259,6 +1259,10 @@ Routine Description:
break;
}

if (Status != EFI_SUCCESS || OutFileBuffer == NULL) {
goto Finish;
}

//
// Get output file length
//
Expand Down

0 comments on commit 8bff404

Please sign in to comment.