-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
Short description
When adding some data through ZipArchive::addData, the buffer read/file write is delayed until ZipArchive::close is called. This is a problem if the user wants to write the data immediately and free the underlying memory.
I couldn't find any workaround.
Example from my project
// Add data to an existing ZipArchive
filename.clear() << folder << SEP << "areas.txt";
study.pZipArchive->addData(filename.c_str(),
out.c_str(),
out.size());
// out is freed
// Do some more stuff not related to out & libzippp
pZipArchive->close(); // <= Valgrind indicated an invalid read, with some garbage characters in the corresponding entryMetadata
Metadata
Assignees
Labels
No labels