You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tyler Palsulich (JIRA)" <ji...@apache.org> on 2015/03/20 22:28:38 UTC

[jira] [Closed] (TIKA-1388) Tika IOUtils java.lang.OutOfMemoryError

     [ https://issues.apache.org/jira/browse/TIKA-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tyler Palsulich closed TIKA-1388.
---------------------------------
    Resolution: Not a Problem

You can't convert an infinite [InputStream|https://github.com/tutmosisII/TDDJNTikaOutOfMemoryError/blob/master/src/test/java/co/edu/unbosque/test/IOUtilsOutOfMemoryErrorTest.java] to a {{Byte[]}} with finite memory. So, I'm closing this as Not a Problem.

If someone thinks we should provide the capability to limit the number of bytes copied over, please open a new issue.

> Tika IOUtils java.lang.OutOfMemoryError
> ---------------------------------------
>
>                 Key: TIKA-1388
>                 URL: https://issues.apache.org/jira/browse/TIKA-1388
>             Project: Tika
>          Issue Type: Bug
>          Components: general
>            Reporter: Alejandro León Mora
>            Priority: Minor
>             Fix For: 1.8
>
>
> There is a possible Buffer Overflow error in IOUtils class buecause the buffer is not limited. A Unitary test is present in https://github.com/tutmosisII/TDDJNTikaOutOfMemoryError.
> The error generated has this stack trace:
> Requested array size exceeds VM limit
> java.lang.OutOfMemoryError
> 	at java.util.Arrays.copyOf(Arrays.java:2271)
> 	at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
> 	at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
> 	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
> 	at org.apache.tika.io.IOUtils.copyLarge(IOUtils.java:934)
> 	at org.apache.tika.io.IOUtils.copy(IOUtils.java:907)
> 	at org.apache.tika.io.IOUtils.toByteArray(IOUtils.java:197)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)