You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/02/23 02:30:56 UTC
svn commit: r1292613 - in /commons/proper/compress/trunk/src:
changes/changes.xml
test/java/org/apache/commons/compress/compressors/BZip2TestCase.java
test/resources/COMPRESS-131.bz2
Author: sebb
Date: Thu Feb 23 01:30:56 2012
New Revision: 1292613
URL: http://svn.apache.org/viewvc?rev=1292613&view=rev
Log:
COMPRESS-131 ArrayOutOfBounds while decompressing bz2. Added test case - code already seems to have been fixed.
Added:
commons/proper/compress/trunk/src/test/resources/COMPRESS-131.bz2 (with props)
Modified:
commons/proper/compress/trunk/src/changes/changes.xml
commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/compressors/BZip2TestCase.java
Modified: commons/proper/compress/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1292613&r1=1292612&r2=1292613&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Thu Feb 23 01:30:56 2012
@@ -46,6 +46,9 @@ The <action> type attribute can be add,u
<body>
<release version="1.4" date="unreleased"
description="Release 1.4">
+ <action issue="COMPRESS-131" type="update" date="2012-02-23">
+ ArrayOutOfBounds while decompressing bz2. Added test case - code already seems to have been fixed.
+ </action>
<action issue="COMPRESS-178" type="fix" date="2012-02-23">
TarArchiveInputStream throws IllegalArgumentException instead of IOException
</action>
Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/compressors/BZip2TestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/compressors/BZip2TestCase.java?rev=1292613&r1=1292612&r2=1292613&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/compressors/BZip2TestCase.java (original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/compressors/BZip2TestCase.java Thu Feb 23 01:30:56 2012
@@ -104,4 +104,25 @@ public final class BZip2TestCase extends
is.close();
}
}
+
+ public void testCOMPRESS131() throws Exception {
+ final File input = getFile("COMPRESS-131.bz2");
+ final InputStream is = new FileInputStream(input);
+ try {
+ final CompressorInputStream in =
+ new BZip2CompressorInputStream(is, true);
+ try {
+ int l = 0;
+ while(in.read() != -1) {
+ l++;
+ }
+ assertEquals(539, l);
+ } finally {
+ in.close();
+ }
+ } finally {
+ is.close();
+ }
+ }
+
}
Added: commons/proper/compress/trunk/src/test/resources/COMPRESS-131.bz2
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/resources/COMPRESS-131.bz2?rev=1292613&view=auto
==============================================================================
Binary file - no diff available.
Propchange: commons/proper/compress/trunk/src/test/resources/COMPRESS-131.bz2
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream