diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2013-11-04 07:39:43 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2013-11-04 07:39:43 -0500 |
commit | b686fa45b6e4960dfa0ef1b1897505aec98b9bea (patch) | |
tree | 40d122c795b0d7f0adc455c3f0451008ca5d63a9 /org.eclipse.jgit | |
parent | 17dc02a579d2e5f7174bb46dbccd636272d41990 (diff) | |
parent | 98bc384d2bd62f3abe7f8b14d8098b3445b6b6e3 (diff) | |
download | jgit-b686fa45b6e4960dfa0ef1b1897505aec98b9bea.tar.gz jgit-b686fa45b6e4960dfa0ef1b1897505aec98b9bea.zip |
Merge "testMaliciousPathEmpty fails on Windows"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index dd9ee10bf3..bd896864d7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -1202,8 +1202,9 @@ public class DirCacheCheckout { // Space or period at end of file name is ignored by Windows. // Treat this as a bad path for now. We may want to handle // this as case insensitivity in the future. - if (raw[ptr - 1] == '.' || raw[ptr - 1] == ' ') - return false; + if (ptr > 0) + if (raw[ptr - 1] == '.' || raw[ptr - 1] == ' ') + return false; int i; // Bad names, eliminate suffix first for (i = start; i < ptr; ++i) |