Issue 58961

Summary: Do not use the stream that might be dispose in drawdoc3.cxx
Product: General Reporter: mikhail.voytenko
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: 680m142   
Target Milestone: AOO Later   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description mikhail.voytenko 2005-12-06 15:44:13 UTC
The code in drawdoc3.cxx:SdDrawDocument::GetDocumentStream() uses
XStorage::openStreamElement() to get the stream. But the stream's parent is
disposed aftewards since it goes out of scope. Most of time it works by luck
since the ::utl::UcbStreamHelper::CreateStream() implementation copies the
stream in case it is not seekable, and READ access does not require seeking. But
in case the stream was already opened for writing or reading the stream might be
seekable, since there is already cached data.

As MBA has suggested the drawdoc3.cxx:SdDrawDocument::GetDocumentStream() method
should be removed, moreover for later versions nonseekable XInputStream should
be enough to read the graphics.
Comment 1 Marcus 2017-05-20 11:31:21 UTC
Reset assigne to the default "issues@openoffice.apache.org".