Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/GP-4260_ryanmkurtz_mz'
Browse files Browse the repository at this point in the history
(Closes #6029)
  • Loading branch information
ryanmkurtz committed Jan 25, 2024
2 parents d92932a + 2dc7a8f commit 0aa317f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ private void processMemoryBlocks(Program program, FileBytes fileBytes,
}
// Allocate an initialized memory block for each segment we know about
int endOffset = pagesToBytes(header.e_cp() - 1) + header.e_cblp();
if (endOffset > reader.length()) {
log.appendMsg(
"File is 0x%x bytes but header reports 0x%x".formatted(reader.length(), endOffset));
endOffset = (int) reader.length();
}
MemoryBlock lastBlock = null;
List<SegmentedAddress> orderedSegments = new ArrayList<>(knownSegments);
for (int i = 0; i < orderedSegments.size(); i++) {
Expand Down

0 comments on commit 0aa317f

Please sign in to comment.