diff --git a/appengine/src/main/java/org/retrostore/rpc/api/UploadStateApiCall.java b/appengine/src/main/java/org/retrostore/rpc/api/UploadStateApiCall.java index 9247eef..7c8086b 100644 --- a/appengine/src/main/java/org/retrostore/rpc/api/UploadStateApiCall.java +++ b/appengine/src/main/java/org/retrostore/rpc/api/UploadStateApiCall.java @@ -63,9 +63,8 @@ private boolean isStateValid(SystemState state) { private static boolean isRegionValid(SystemState.MemoryRegion region) { final int MAX_SIZE = 1000000; boolean valid = region.getStart() >= 0 && region.getStart() < MAX_SIZE - && region.getLength() > 0 && region.getLength() < MAX_SIZE - && region.getData().toByteArray().length < MAX_SIZE - && region.getData().toByteArray().length == region.getLength(); + && region.getLength() < MAX_SIZE + && region.getData().toByteArray().length < MAX_SIZE; if (!valid) { log.warning("===== Region is invalid: ====="); log.warning("Start : " + region.getStart());