external/libstaroffice/0001-fix-null-ptr-deref.-if-decryption-failed.patch.1 | 35 ++++++++++ external/libstaroffice/UnpackedTarball_libstaroffice.mk | 4 + 2 files changed, 39 insertions(+)
New commits: commit 21827d1776b3c47ecab76561cf3e95bbf79f4a6e Author: David Tardon <dtar...@redhat.com> Date: Wed Mar 28 14:56:40 2018 +0200 forcepoint: fix null ptr deref. Change-Id: I867a4332d666bf4a0e38e93c0c7918fb106958c6 diff --git a/external/libstaroffice/0001-fix-null-ptr-deref.-if-decryption-failed.patch.1 b/external/libstaroffice/0001-fix-null-ptr-deref.-if-decryption-failed.patch.1 new file mode 100644 index 000000000000..658f6797940d --- /dev/null +++ b/external/libstaroffice/0001-fix-null-ptr-deref.-if-decryption-failed.patch.1 @@ -0,0 +1,35 @@ +From 59f29dd735bf5890ea29fdde809afcf111463a65 Mon Sep 17 00:00:00 2001 +From: David Tardon <dtar...@redhat.com> +Date: Mon, 12 Mar 2018 20:33:54 +0100 +Subject: [PATCH] fix null ptr deref. if decryption failed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Thanks to Antti Levomäki and Christian Jalio from Forcepoint. +--- + src/lib/StarObjectDraw.cxx | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/lib/StarObjectDraw.cxx b/src/lib/StarObjectDraw.cxx +index fd3411a..8a19b1c 100644 +--- a/src/lib/StarObjectDraw.cxx ++++ b/src/lib/StarObjectDraw.cxx +@@ -199,10 +199,11 @@ try + if the user mask does correspond to the real mask. + */ + input=StarEncryption::decodeStream(input, StarEncryption::getMaskToDecodeStream(firstByte, 0x44)); +- if (input) { +- zone.setInput(input); +- input->seek(0, librevenge::RVNG_SEEK_SET); ++ if (!input) { ++ STOFF_DEBUG_MSG(("StarObjectDraw::readDrawDocument: decryption failed\n")); ++ return false; + } ++ zone.setInput(input); + } + input->seek(0, librevenge::RVNG_SEEK_SET); + std::shared_ptr<StarObjectModel> model(new StarObjectModel(*this, true)); +-- +2.14.3 + diff --git a/external/libstaroffice/UnpackedTarball_libstaroffice.mk b/external/libstaroffice/UnpackedTarball_libstaroffice.mk index 17bf429eb8d0..781634ab9fb3 100644 --- a/external/libstaroffice/UnpackedTarball_libstaroffice.mk +++ b/external/libstaroffice/UnpackedTarball_libstaroffice.mk @@ -37,4 +37,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \ )) endif +$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \ + external/libstaroffice/0001-fix-null-ptr-deref.-if-decryption-failed.patch.1 \ +)) + # vim: set noet sw=4 ts=4: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits