Kaydet (Commit) 21827d17 authored tarafından David Tardon's avatar David Tardon

forcepoint: fix null ptr deref.

Change-Id: I867a4332d666bf4a0e38e93c0c7918fb106958c6
üst 0db4e7f6
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
...@@ -37,4 +37,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \ ...@@ -37,4 +37,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
)) ))
endif 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: # vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment