Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.4
-
None
Description
The current code only checks for a size bigger than 2MB but ignores when the returned size is 0 or negative. sizeL will be typically equals to zero if the request is made to a WebServer and the response generated live (like PHP). Then the getInputStream(size) will fail in this case when the size is really used by the implementation.
default byte[] getByteArray() throws IOException { final long sizeL = getSize(); if (sizeL > Integer.MAX_VALUE) { throw new IllegalStateException(String.format("File content is too large for a byte array: %,d", sizeL)); }
Attachments
Issue Links
- links to