diff options
author | Dave Borowitz <dborowitz@google.com> | 2012-03-23 14:38:06 -0700 |
---|---|---|
committer | Dave Borowitz <dborowitz@google.com> | 2012-03-23 14:38:06 -0700 |
commit | e0531ace35b9c8eca9ded0a7b1540de3c49dbde6 (patch) | |
tree | b90682221940dbe7c8317af378925aba70898138 | |
parent | 9dd6e6cd297ae9c0d912ecfa07a148a29e6f4eee (diff) | |
download | jgit-e0531ace35b9c8eca9ded0a7b1540de3c49dbde6.tar.gz jgit-e0531ace35b9c8eca9ded0a7b1540de3c49dbde6.zip |
Properly parse first line in ReceivePack with no '\0'
Change-Id: Ic98e17aff4e4b3c3fa0359082bab689e4522e3d7
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java index 81c44ae322..126d74fc37 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -115,8 +115,9 @@ public class ReceivePack { if (nul >= 0) { for (String c : line.substring(nul + 1).split(" ")) caps.add(c); - } - this.line = line.substring(0, nul); + this.line = line.substring(0, nul); + } else + this.line = line; this.capabilities = Collections.unmodifiableSet(caps); } |