52e1a6a3e4
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>
81 lines
2.6 KiB
Makefile
81 lines
2.6 KiB
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#*************************************************************************
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
#*************************************************************************
|
|
|
|
$(eval $(call gb_CppunitTest_CppunitTest,tools_test))
|
|
|
|
$(eval $(call gb_CppunitTest_use_external,tools_test,boost_headers))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,tools_test, \
|
|
tools/qa/cppunit/test_bigint \
|
|
tools/qa/cppunit/test_date \
|
|
tools/qa/cppunit/test_time \
|
|
tools/qa/cppunit/test_fract \
|
|
tools/qa/cppunit/test_inetmime \
|
|
tools/qa/cppunit/test_json_writer \
|
|
tools/qa/cppunit/test_pathutils \
|
|
tools/qa/cppunit/test_poly \
|
|
tools/qa/cppunit/test_reversemap \
|
|
tools/qa/cppunit/test_stream \
|
|
tools/qa/cppunit/test_urlobj \
|
|
tools/qa/cppunit/test_color \
|
|
tools/qa/cppunit/test_rectangle \
|
|
tools/qa/cppunit/test_minmax \
|
|
tools/qa/cppunit/test_100mm2twips \
|
|
tools/qa/cppunit/test_fround \
|
|
tools/qa/cppunit/test_xmlwalker \
|
|
tools/qa/cppunit/test_xmlwriter \
|
|
tools/qa/cppunit/test_GenericTypeSerializer \
|
|
tools/qa/cppunit/test_guid \
|
|
tools/qa/cppunit/test_cpuid \
|
|
tools/qa/cppunit/test_cpu_runtime_detection_AVX2 \
|
|
tools/qa/cppunit/test_cpu_runtime_detection_SSE2 \
|
|
tools/qa/cppunit/test_cpu_runtime_detection_SSSE3 \
|
|
tools/qa/cppunit/test_Wildcard \
|
|
tools/qa/cppunit/test_zcodec \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,tools_test,\
|
|
tools/qa/cppunit/test_cpu_runtime_detection_AVX2_check, $(CXXFLAGS_INTRINSICS_AVX2) \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,tools_test,\
|
|
tools/qa/cppunit/test_cpu_runtime_detection_SSE2_check, $(CXXFLAGS_INTRINSICS_SSE2) \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_add_exception_objects,tools_test,\
|
|
tools/qa/cppunit/test_cpu_runtime_detection_SSSE3_check, $(CXXFLAGS_INTRINSICS_SSSE3) \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_sdk_api,tools_test))
|
|
|
|
$(eval $(call gb_CppunitTest_use_libraries,tools_test, \
|
|
basegfx \
|
|
sal \
|
|
tl \
|
|
test \
|
|
unotest \
|
|
vcl \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_use_static_libraries,tools_test, \
|
|
ooopathutils \
|
|
))
|
|
|
|
$(eval $(call gb_CppunitTest_set_include,tools_test,\
|
|
$$(INCLUDE) \
|
|
-I$(SRCDIR)/tools/inc \
|
|
))
|
|
|
|
$(eval $(call gb_Library_use_externals,tools_test,\
|
|
libxml2 \
|
|
))
|
|
|
|
# vim: set noet sw=4 ts=4:
|