From 3c9bc10042321cdb47be08190d9e9253be008a83 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Fri, 18 Apr 2014 12:57:44 +0200 Subject: [PATCH] Zip: fixed a crash caused by an I/O error (e.g., full disk) while creating a Zip archive --- Zip/src/ZipStream.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Zip/src/ZipStream.cpp b/Zip/src/ZipStream.cpp index 29310e76c..5d2adb9c8 100644 --- a/Zip/src/ZipStream.cpp +++ b/Zip/src/ZipStream.cpp @@ -1,7 +1,7 @@ // // ZipStream.cpp // -// $Id: //poco/1.4/Zip/src/ZipStream.cpp#3 $ +// $Id: //poco/1.4/Zip/src/ZipStream.cpp#4 $ // // Library: Zip // Package: Zip @@ -163,6 +163,11 @@ ZipStreamBuf::ZipStreamBuf(std::ostream& ostr, ZipLocalFileHeader& fileEntry, bo ZipStreamBuf::~ZipStreamBuf() { + // make sure destruction of streams happens in correct order + _ptrOBuf = 0; + _ptrOHelper = 0; + _ptrBuf = 0; + _ptrHelper = 0; }