office-gobmx/tools
Luboš Luňák 52e1a6a3e4 use a read-only stream when reading graphic data
EmbeddedObjectRef::GetGraphicStream() creates a writable
SvMemoryStream, read the graphics data into it and then returns
the stream, which will be afterwards used to decode the graphics.
But if the data is broken, incorrect seeking may cause a seek
way past the buffer, and since the stream is writable, it would
be done and cause problems such as running out of memory.
The VersionCompatRead class is one such place that reads size
from the stream and then seeks based on the read data.

Add SvMemoryStream::MakeReadOnly() that will change the stream
to be read-only after the initial read of the data into it.

Change-Id: I1d44aabaf73071a691adafa489e65e4f5e3f021d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137002
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-07-12 18:45:14 +02:00
..
inc
qa use a read-only stream when reading graphic data 2022-07-12 18:45:14 +02:00
source use a read-only stream when reading graphic data 2022-07-12 18:45:14 +02:00
CppunitTest_tools_config.mk
CppunitTest_tools_test.mk use a read-only stream when reading graphic data 2022-07-12 18:45:14 +02:00
CustomTarget_reversemap.mk
Executable_bestreversemap.mk
IwyuFilter_tools.yaml
Library_tl.mk
Makefile
Module_tools.mk
README.md
StaticLibrary_ooopathutils.mk

Old Tools (Deprecated)

Predates sal - string functions, url manipulation, stream stuff, polygons, etc.

Exact history is lost before Sept. 18th, 2000, but old source code comments show that part of the tools library dates back until at least April 1991.

This directory will be removed in the near future (see tdf#39445 or tdf#63154).