diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-10-03 00:47:05 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-10-03 00:47:16 +0200 |
commit | 285073d55401d52e7b451b101dc1d3be879a1147 (patch) | |
tree | 88b347132487b4a75521f90e36c926bbf9ca04a8 | |
parent | 37c8b353441e3883594c0ea6820b4c3fbc711321 (diff) | |
parent | 430a34e6e19bbded0615ffb6952103896ba09682 (diff) | |
download | jgit-285073d55401d52e7b451b101dc1d3be879a1147.tar.gz jgit-285073d55401d52e7b451b101dc1d3be879a1147.zip |
Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
Prepare 5.3.7-SNAPSHOT builds
JGit v5.3.6.201910020505-r
Prepare 5.1.13-SNAPSHOT builds
JGit v5.1.12.201910011832-r
Do not rely on ArrayIndexOutOfBoundsException to detect end of input
Change-Id: Ia1070fd170651ce827bc6b876c6764a44ffe60eb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java index 71f863589d..16db717032 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java @@ -1494,12 +1494,10 @@ public class Config { } int read() { - try { - return buf[pos++]; - } catch (ArrayIndexOutOfBoundsException e) { - pos = buf.length; + if (pos >= buf.length) { return -1; } + return buf[pos++]; } void reset() { |