Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-1388

Tika IOUtils java.lang.OutOfMemoryError

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • None
    • 1.8
    • general
    • None

    Description

      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)

      Attachments

        Activity

          People

            Unassigned Unassigned
            tutmosisII Alejandro León Mora
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: