diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-16 06:30:16 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-16 06:30:16 +0000 |
commit | 497ef745f0719f3dffc5f4be45aa3652a52f2316 (patch) | |
tree | d7311527566789782100b1e90ec59ac29fee86b2 /MdePkg/Library | |
parent | 2bbf72b0ab9da75b2f980ee69e2b6356ecf130b7 (diff) | |
download | edk2-platforms-497ef745f0719f3dffc5f4be45aa3652a52f2316.tar.xz |
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
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c index cce9a82520..d82107ecde 100644 --- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c @@ -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
//
|