Hello Clemens, hello all, > On 12 June 2019 at 06:12 Clemens Kolbitsch <kolbit...@lastline.com> wrote: > > Tried the patch, but didn't really help. BUT: I'm actually a bit surprised
could you please tell me what program behaviour changed, if any? Under some debugger or not? If yes, which? What is the number and order of filters in your PDF, please (see also below)? > by the patch itself: > + if ( NULL != m_pOutputStream ) > + m_pOutputStream->Close(); > + > delete m_pOutputStream; > > Isn't the "if" essentially a NOP? If m_pOutputStream were NULL, the delete > would segfault in every case (as you're deleting NULL) AFAIK it wouldn't, firstly m_pOutputStream is set to NULL in the constructor if its parameter bOwnStream is false (class is PdfFilteredDecodeStream), so any destruction of such an object with a non-owned stream (the description in the doc comment of the class is misleading here) would then segfault, secondly cppreference.com says otherwise [1], so please reconsider. > -Clemens > On Tue, Jun 11, 2019 at 9:55 PM Clemens Kolbitsch < kolbit...@lastline.com> > wrote: > > Thanks for the super fast response, and yes, I'm on the list :-) Will test > the patch shortly and post results You're welcome, I'm also on the list, and thanks for testing the patch. I'll try to make a better if you tell me more about your test case so I can build something similar to test my ideas with (for much reduced round-trip time). Best regards, mabri (Matthew in english) [1] Quote from 1) "The behavior of the standard library implementation of this function is undefined unless ptr is a null pointer or [...]", which is at https://en.cppreference.com/w/cpp/memory/new/operator_delete _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users