diff options
author | David Tardon <dtardon@redhat.com> | 2018-03-28 14:56:40 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2018-03-28 14:58:29 +0200 |
commit | 21827d1776b3c47ecab76561cf3e95bbf79f4a6e (patch) | |
tree | 75bb47a9547dfefca5aeeec68b074c5b9ef7c1fd /external/libstaroffice | |
parent | 0db4e7f60c92313327ae5b1e4307ed4fedfaa6f5 (diff) |
forcepoint: fix null ptr deref.
Change-Id: I867a4332d666bf4a0e38e93c0c7918fb106958c6
Diffstat (limited to 'external/libstaroffice')
-rw-r--r-- | external/libstaroffice/0001-fix-null-ptr-deref.-if-decryption-failed.patch.1 | 35 | ||||
-rw-r--r-- | external/libstaroffice/UnpackedTarball_libstaroffice.mk | 4 |
2 files changed, 39 insertions, 0 deletions
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 <dtardon@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: |