You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/*read zip file to buffer */
auto za = ZipArchive::fromWritableBuffer(buffer, buffer_size, ZipArchive::Write);
/* read file1 to buf */
za.addData("path/to/file1", file1_buffer, file2_buffer_size, true);
za.deleteEntry("path/to/file2");
za.close();
/* write buffer to zip file */
/* when decompressing with 7z, it prompts "Invalid data besides valid data" */
The text was updated successfully, but these errors were encountered:
lindyer
changed the title
Can not close a zip archive create from writable buffer normally after delete entries
Add data files and then delete other entries, abnormal data will appear in the zip archive.
Jun 14, 2024
Maybe I found out something strange while working on #233... libzip seems to read the invalid data after adding empty entries after a file and that might be the same problem encountered by this issue.
At this point, I'm not sure it is a libzippp issue or an upstream one... I wasn't able to reproduce it on my computer (g++ 14) but it systematically failed on Travis CI (g++ 9).
The text was updated successfully, but these errors were encountered: