commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IO-302) ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple times
Date Wed, 22 Feb 2012 19:23:49 GMT

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

Gary D. Gregory resolved IO-302.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2
         Assignee: Gary D. Gregory

In SVN.
                
> ArrayIndexOutOfBoundsException in BOMInputStream when reading a file without BOM multiple
times
> -----------------------------------------------------------------------------------------------
>
>                 Key: IO-302
>                 URL: https://issues.apache.org/jira/browse/IO-302
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Streams/Writers
>    Affects Versions: 2.1
>         Environment: Win7 64bit, Java 6 32bit
>            Reporter: Jan Steuerwald
>            Assignee: Gary D. Gregory
>             Fix For: 2.2
>
>         Attachments: IO-302.patch, Test.java, testfileBOM.xml, testfileNoBOM.xml
>
>
> Resetting the BOMInputStream doesn't reset the _fbLength_ member variable. This causes
_fbLength_ to grow bigger than the _firstBytes_ array (when the file doesn't contain a BOM),
which leads to an ArrayIndexOutOfBoundsException in the _readFirstBytes_ method.
> The attached test case reveals the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message