You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Resolved) (JIRA)" <ji...@apache.org> on 2012/02/22 20:23:49 UTC
[jira] [Resolved] (IO-302) ArrayIndexOutOfBoundsException in
BOMInputStream when reading a file without BOM multiple times
[ 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