diff options
-rw-r--r-- | MdePkg/Library/BasePeCoffLib/BasePeCoff.c | 4 | ||||
-rw-r--r-- | Tools/CCode/Source/PeCoffLoader/BasePeCoff.c | 4 |
2 files changed, 4 insertions, 4 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
//
diff --git a/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c b/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c index 72df90f389..06d4b83af7 100644 --- a/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c +++ b/Tools/CCode/Source/PeCoffLoader/BasePeCoff.c @@ -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
//
|