https://bz.apache.org/bugzilla/show_bug.cgi?id=63569
Bug ID: 63569 Summary: [PATCH] toByteArray(InputStream stream) in IOUtils always generate exception Product: POI Version: 4.0.0-FINAL Hardware: All OS: All Status: NEW Severity: blocker Priority: P2 Component: POI Overall Assignee: dev@poi.apache.org Reporter: jean-severin.l...@m4x.org Target Milestone: --- This call indeed call toByteArray(InputStream stream, Integer.MAX_LENGTH, Integer.MAX_LENGTH) and run in an exception considering this is a too long ByteArray. It's a wrong asumption considering that this value is only to say "unknown length", and that the function manage this unknown length... The patch is to replace: checkLength(length, maxLength); by : if ((length!=Integer.MAX_VALUE) || (maxLength!=Integer.MAX_VALUE)) checkLength(length, maxLength); -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org