diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java index 2bf0b96f6..fef38ccac 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/PackFile.java @@ -599,7 +599,7 @@ public class PackFile implements Iterable { JGitText.get().packObjectCountMismatch, packCnt, idx.getObjectCount(), getPackFile())); fd.seek(length - 20); - fd.read(buf, 0, 20); + fd.readFully(buf, 0, 20); if (!Arrays.equals(buf, packChecksum)) throw new PackMismatchException(MessageFormat.format( JGitText.get().packObjectCountMismatch