Bug 514117 - KZip can't create zip files > 4GB
Summary: KZip can't create zip files > 4GB
Status: REPORTED
Alias: None
Product: frameworks-karchive
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-03 17:41 UTC by Randall Rude
Modified: 2026-01-03 17:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randall Rude 2026-01-03 17:41:51 UTC
This was reported as KPhotoAlbum bug 512199 but is actually a bug in KZip.

SUMMARY

If KZip is asked to zip files of size ~4GB or more, it will create an invalid zip file.
 
STEPS TO REPRODUCE
$ du -sh ~/images/2017
5.4G    /home/me/images/2017
$ ~/kde/build/karchive/bin/kziptest create test.zip ~/images/2017/*
$ echo $?
0
$ ~/kde/build/karchive/bin/kziptest print-all test.zip 
Opening zip file
Could not open "test.zip" for reading. ZIP file doesn't exist or is invalid: "Invalid ZIP file. Unrecognized header at offset 369583458"
$ unzip -t test.zip
Archive:  test.zip
warning [test.zip]:  4294967296 extra bytes at beginning or within zipfile
  (attempting to process anyway)
file #1:  bad zipfile offset (local header sig):  4294967296
  (attempting to re-compensate)
    testing: filename.JPG   OK
error: not enough memory for bomb detection
At least one error was detected in test.zip.

OBSERVED RESULT

KZip silently fails to create a valid zip file.

EXPECTED RESULT

KZip should create a valid zip file, or report an error to the application if it is unable to do so.

SOFTWARE/OS VERSIONS
$ kde-builder --show-info
kde-builder r618.11f4896
OS: ubuntu

ADDITIONAL INFORMATION
KArchive was built today using kde-builder.
$ git rev-parse HEAD
ea694e46b40f5ec4a21690ce814ca1485896cbc5