summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-17 14:37:17 +0100
committerAndras Timar <andras.timar@collabora.com>2016-06-26 14:01:54 +0200
commitfa8248b6b012ab0f060de26400975b66ddbab47a (patch)
treeccf44750effda3734c3f3d80decd65d6a40ddbf8 /external
parent213953c89f56c5b87ec1e29fa33938b56f8f7082 (diff)
Resolves: tdf#90579 swap_single_to_multi_blocks is broken
when there is associated data in the src. Its copies those pointers into the block that will appear in the destination. Then can destroy the source block, which deletes the contents of those pointers, and then inserts the new block which has dangling pointers to the deleted data. https://gitlab.com/mdds/mdds/merge_requests/2 (cherry picked from commit 9ec54e92407cd632c4e38317f914edd557835a86) (cherry picked from commit 6114072a59cfff36218aea70e1b52fa4c3ba64b4) Change-Id: Id9614d95652c8032b03cb5748a284917043d8d21 Reviewed-on: https://gerrit.libreoffice.org/26429 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 19312e13c4ab802c2bd878f4448556f245884a13)
Diffstat (limited to 'external')
-rw-r--r--external/mdds/UnpackedTarball_mdds.mk1
-rw-r--r--external/mdds/tdf90579.patch.023
2 files changed, 24 insertions, 0 deletions
diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk
index 504406bbb60a..1ccd5de997a2 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
external/mdds/mdds_0.6.0.patch \
external/mdds/mdds-c++98.patch.0 \
external/mdds/0001-another-step-to-allow-fst-to-use-any-value-type.patch.1 \
+ external/mdds/tdf90579.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/mdds/tdf90579.patch.0 b/external/mdds/tdf90579.patch.0
new file mode 100644
index 000000000000..5ef1bc74097d
--- /dev/null
+++ b/external/mdds/tdf90579.patch.0
@@ -0,0 +1,23 @@
+diff --git a/include/mdds/multi_type_vector_def.inl b/include/mdds/multi_type_vector_def.inl
+index 0e2a15a..fe9c767 100644
+--- include/mdds/multi_type_vector_def.inl
++++ include/mdds/multi_type_vector_def.inl
+@@ -2306,6 +2306,9 @@ void multi_type_vector<_CellBlockFunc, _EventFunc>::swap_single_to_multi_blocks(
+ {
+ // Source range is at the top of a block.
+
++ // Shrink the current block by erasing the top part.
++ element_block_func::erase(*blk_src->mp_data, 0, len);
++
+ if (src_tail_len == 0)
+ {
+ // the whole block needs to be replaced.
+@@ -2314,8 +2317,6 @@ void multi_type_vector<_CellBlockFunc, _EventFunc>::swap_single_to_multi_blocks(
+ }
+ else
+ {
+- // Shrink the current block by erasing the top part.
+- element_block_func::erase(*blk_src->mp_data, 0, len);
+ blk_src->m_size -= len;
+ }
+