[
https://issues.apache.org/jira/browse/COMPRESS-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18058391#comment-18058391
]
Gary D. Gregory commented on COMPRESS-705:
------------------------------------------
Hi [~jonesbusy]
Yes, there is definitely a release planned as soon as possible. There are just
a couple more items of housekeeping that we need to work on. It is on my
priority list but we have fixes in other components that sometimes get in the
way.
Thank you for your patience!
> GZip IOException: Extra subfield lenght exceeds remaining bytes in extra field
> ------------------------------------------------------------------------------
>
> Key: COMPRESS-705
> URL: https://issues.apache.org/jira/browse/COMPRESS-705
> Project: Commons Compress
> Issue Type: Bug
> Components: Compressors
> Affects Versions: 1.28.0
> Environment: $ sw_vers
>
> ProductName: macOS
> ProductVersion: 15.6
> BuildVersion: 24G84
> $ java -version
>
> java version "24.0.1" 2025-04-15
> Java(TM) SE Runtime Environment Oracle GraalVM 24.0.1+9.1 (build
> 24.0.1+9-jvmci-b01)
> Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 24.0.1+9.1 (build
> 24.0.1+9-jvmci-b01, mixed mode, sharing)
> Reporter: Mario Fredenhagen
> Priority: Major
> Fix For: 1.29.0
>
> Attachments: grafana-9.2.9.tgz
>
>
> We try to read the content of a helm chart via a method like this:
> {noformat}
> $ helm repo add grafana https://grafana.github.io/helm-charts && helm repo
> update grafana
> $ cd /tmp && helm pull grafana/grafana --version 9.2.9{noformat}
>
> {noformat}
> import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
> import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
> import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
> import java.io.IOException;
> import java.nio.file.Files;
> import java.io.File;
> import java.util.ArrayList;
> import java.util.List;
> public class Main {
> public static void main(String[] args) throws IOException {
> var tarZippedArchive = new File("/tmp/grafana-9.2.9.tgz");
> var fileNames = getFileNamesFromTarGz(tarZippedArchive);
> fileNames.forEach(System.out::println);
> }
> private static List<String> getFileNamesFromTarGz(File tarZippedArchive)
> throws IOException {
> var fileNames = new ArrayList<String>();
> var input = Files.newInputStream(tarZippedArchive.toPath());
> try (TarArchiveInputStream tar = new TarArchiveInputStream(new
> GzipCompressorInputStream(input))) {
> TarArchiveEntry entry;
> while ((entry = tar.getNextEntry()) != null) {
> fileNames.add(entry.getName());
> }
> }
> return fileNames;
> }
> } {noformat}
> and get this error:
> {noformat}
> Exception in thread "main" java.io.IOException: Extra subfield lenght exceeds
> remaining bytes in extra: 21064 > 37
> at
> org.apache.commons.compress.compressors.gzip.ExtraField.fromBytes(ExtraField.java:154)
> at
> org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.init(GzipCompressorInputStream.java:388)
> at
> org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:273)
> at
> org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:286)
> at Main.getFileNamesFromTarGz(Main.java:23)
> at Main.main(Main.java:15){noformat}
> The same was working with version 1.27.1, so it is a regression. Command-line
> utilities like `tar` can handle this archive without problems.
>
> Also note the typo in the exception message lenght > length ;)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)