office-gobmx/tools/qa/cppunit
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
..
test_100mm2twips.cxx
test_bigint.cxx
test_color.cxx
test_config.cxx
test_cpu_runtime_detection_AVX2.cxx
test_cpu_runtime_detection_AVX2_check.cxx
test_cpu_runtime_detection_SSE2.cxx
test_cpu_runtime_detection_SSE2_check.cxx
test_cpu_runtime_detection_SSSE3.cxx
test_cpu_runtime_detection_SSSE3_check.cxx
test_cpu_runtime_detection_x86_checks.hxx
test_cpuid.cxx
test_date.cxx
test_fract.cxx
test_fround.cxx
test_GenericTypeSerializer.cxx
test_guid.cxx Fix typos 2022-04-05 21:46:05 +02:00
test_inetmime.cxx
test_json_writer.cxx sw content controls, dropdown: add LOK API 2022-05-13 09:10:25 +02:00
test_minmax.cxx
test_pathutils.cxx
test_poly.cxx
test_rectangle.cxx tools: rename getHeight/Width() to GetOpenHeight/Width() 2022-07-11 11:06:53 +02:00
test_reversemap.cxx
test_stream.cxx use a read-only stream when reading graphic data 2022-07-12 18:45:14 +02:00
test_time.cxx
test_urlobj.cxx use more string_view in INetURLObject 2022-04-29 08:53:22 +02:00
test_Wildcard.cxx
test_xmlwalker.cxx
test_xmlwriter.cxx
test_zcodec.cxx Add unit tests for ZCodec 2022-06-15 10:21:36 +02:00