Skip to content

Commit fea3d8c

Browse files
committed
Fix possible int overflow error
1 parent c8dd55e commit fea3d8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/file/src/main/java/org/trellisldp/file/FileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static InputStream getBoundedStream(final InputStream stream, final int f
176176
throws IOException {
177177
final long skipped = stream.skip(from);
178178
LOGGER.debug("Skipped {} bytes", skipped);
179-
return new BoundedInputStream(stream, to - from);
179+
return new BoundedInputStream(stream, (long) to - from);
180180
}
181181

182182
/**

0 commit comments

Comments
 (0)