Issue 58961 - Do not use the stream that might be dispose in drawdoc3.cxx
Summary: Do not use the stream that might be dispose in drawdoc3.cxx
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 680m142
Hardware: All All
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2005-12-06 15:44 UTC by mikhail.voytenko
Modified: 2017-05-20 11:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
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 "".