summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorHan-Wen NIenhuys <hanwen@google.com>2023-02-02 09:09:25 -0500
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2023-02-02 09:09:25 -0500
commita1fa0ee679f64c0bdd6e27c0190ff7ded6177fbf (patch)
treefa619bc891d1f593105969ca4e1dace526fa507b /org.eclipse.jgit
parentf94ab7680cbe790e9662820fcef4bf4e8dfa9ed2 (diff)
parent341116103e0eab7b8464a74affadf940652669b1 (diff)
downloadjgit-a1fa0ee679f64c0bdd6e27c0190ff7ded6177fbf.tar.gz
jgit-a1fa0ee679f64c0bdd6e27c0190ff7ded6177fbf.zip
Merge "UploadPack: consume delimiter in object-info command"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java
index c4129ff4d0..e437f22d02 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java
@@ -281,6 +281,12 @@ final class ProtocolV2Parser {
return builder.build();
}
+ if (!PacketLineIn.isDelimiter(line)) {
+ throw new PackProtocolException(MessageFormat
+ .format(JGitText.get().unexpectedPacketLine, line));
+ }
+
+ line = pckIn.readString();
if (!line.equals("size")) { //$NON-NLS-1$
throw new PackProtocolException(MessageFormat
.format(JGitText.get().unexpectedPacketLine, line));