summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2019-08-07 23:28:32 +0200
committerHan-Wen Nienhuys <hanwen@google.com>2019-08-19 11:40:28 +0200
commitd7ee5aafee7c4eabeea6de8dd125a1ad4ddcdc0f (patch)
tree14100d18d10f3d05d239478bf3a20bf27e6761e6 /org.eclipse.jgit
parent81801d6f965bacaed6c044ed26b5119043eb2133 (diff)
downloadjgit-d7ee5aafee7c4eabeea6de8dd125a1ad4ddcdc0f.tar.gz
jgit-d7ee5aafee7c4eabeea6de8dd125a1ad4ddcdc0f.zip
reftable: increment pointer *after* reading uint16
This fixes timezone reads out of the reflog. Change-Id: I126d8742e5e904a074c544514180720466164f7c Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockReader.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockReader.java
index f9e184c99e..b66751b94c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/BlockReader.java
@@ -557,7 +557,9 @@ class BlockReader {
}
private short readInt16() {
- return (short) NB.decodeUInt16(buf, ptr += 2);
+ short result =(short) NB.decodeUInt16(buf, ptr);
+ ptr += 2;
+ return result;
}
private int readVarint32() {