summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-09-05 12:07:37 -0400
committerJames Moger <james.moger@gitblit.com>2014-09-05 12:07:37 -0400
commit0a73abb640c9b92d55c5589260bd6c1f7e8b6d51 (patch)
tree198e3b601ad3f705a796c69786fecd5dcb337996
parent6561f63e577706869337662663a52ba78c0d4072 (diff)
downloadgitblit-0a73abb640c9b92d55c5589260bd6c1f7e8b6d51.tar.gz
gitblit-0a73abb640c9b92d55c5589260bd6c1f7e8b6d51.zip
Fix NPE in raw servlet for long project names
-rw-r--r--src/main/java/com/gitblit/servlet/RawServlet.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/main/java/com/gitblit/servlet/RawServlet.java b/src/main/java/com/gitblit/servlet/RawServlet.java
index 7504b4be..9fb96a5d 100644
--- a/src/main/java/com/gitblit/servlet/RawServlet.java
+++ b/src/main/java/com/gitblit/servlet/RawServlet.java
@@ -172,10 +172,7 @@ public class RawServlet extends DaggerServlet {
} else {
repository = path.substring(0, slash);
}
- offset += slash;
- if (offset == 0) {
- offset++;
- }
+ offset += ( slash + 1 );
r = repositoryManager.getRepository(repository, false);
if (repository.equals(path)) {
// either only repository in url or no repository found