Ver código fonte

fixes Coverity issue 72287

Sebastian Stenzel 9 anos atrás
pai
commit
e3256a747f

+ 3 - 1
main/frontend-webdav/src/main/java/org/cryptomator/frontend/webdav/jackrabbitservlet/DavFileWithRange.java

@@ -71,7 +71,9 @@ class DavFileWithRange extends DavFile {
 		try {
 			final Long lower = requestRange.getLeft().isEmpty() ? null : Long.valueOf(requestRange.getLeft());
 			final Long upper = requestRange.getRight().isEmpty() ? null : Long.valueOf(requestRange.getRight());
-			if (lower == null) {
+			if (lower == null && upper == null) {
+				return new ImmutablePair<Long, Long>(0l, contentLength - 1);
+			} else if (lower == null) {
 				return new ImmutablePair<Long, Long>(contentLength - upper, contentLength - 1);
 			} else if (upper == null) {
 				return new ImmutablePair<Long, Long>(lower, contentLength - 1);