diff options
author | Han-Wen NIenhuys <hanwen@google.com> | 2023-02-02 09:09:25 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2023-02-02 09:09:25 -0500 |
commit | a1fa0ee679f64c0bdd6e27c0190ff7ded6177fbf (patch) | |
tree | fa619bc891d1f593105969ca4e1dace526fa507b /org.eclipse.jgit | |
parent | f94ab7680cbe790e9662820fcef4bf4e8dfa9ed2 (diff) | |
parent | 341116103e0eab7b8464a74affadf940652669b1 (diff) | |
download | jgit-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.java | 6 |
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)); |