Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Fix for EOFException on NCDump data Unidata/thredds#1342 #1343

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cdm/src/main/java/ucar/nc2/iosp/hdf5/H5header.java
Original file line number Diff line number Diff line change
Expand Up @@ -4767,6 +4767,7 @@ private class GlobalHeap {
long startPos = raf.getFilePointer();
HeapObject o = new HeapObject();
o.id = raf.readShort();
if (o.id == 0) break; // ?? look
o.refCount = raf.readShort();
raf.skipBytes(4);
o.dataSize = readLength();
Expand All @@ -4776,7 +4777,6 @@ private class GlobalHeap {
countBytes += dsize + 16;

// System.out.printf("%d heapId=%d dataSize=%d countBytes=%d%n", count, o.id, o.dataSize, countBytes);
if (o.id == 0) break; // ?? look
if (o.dataSize < 0) break; // ran off the end, must be done
if (countBytes < 0) break; // ran off the end, must be done
if (countBytes > sizeBytes) break; // ran off the end
Expand Down