mirror of https://github.com/acidanthera/audk.git
Fix PeLoad function can't handle invalid PeImage to skip correct debug entry.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2253 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
2bbf72b0ab
commit
497ef745f0
|
@ -391,7 +391,7 @@ PeCoffLoaderGetImageInfo (
|
|||
}
|
||||
|
||||
if (DebugDirectoryEntryFileOffset != 0) {
|
||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += Size) {
|
||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)) {
|
||||
//
|
||||
// Read next debug directory entry
|
||||
//
|
||||
|
@ -479,7 +479,7 @@ PeCoffLoaderGetImageInfo (
|
|||
}
|
||||
|
||||
if (DebugDirectoryEntryFileOffset != 0) {
|
||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += Size) {
|
||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)) {
|
||||
//
|
||||
// Read next debug directory entry
|
||||
//
|
||||
|
|
|
@ -346,7 +346,7 @@ Returns:
|
|||
}
|
||||
|
||||
if (DebugDirectoryEntryFileOffset != 0) {
|
||||
for (Index = 0; Index < (DebugDirectoryEntry->Size); Index += Size) {
|
||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)) {
|
||||
//
|
||||
// Read next debug directory entry
|
||||
//
|
||||
|
@ -438,7 +438,7 @@ Returns:
|
|||
}
|
||||
|
||||
if (DebugDirectoryEntryFileOffset != 0) {
|
||||
for (Index = 0; Index < (DebugDirectoryEntry->Size); Index += Size) {
|
||||
for (Index = 0; Index < DebugDirectoryEntry->Size; Index += sizeof (EFI_IMAGE_DEBUG_DIRECTORY_ENTRY)) {
|
||||
//
|
||||
// Read next debug directory entry
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue