summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-01 08:39:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-01 12:31:36 +0200
commit79180421cb1b8f5b94ca442d0cee57773466ceea (patch)
treed34b9c4f33897757820f8bbe029ec45db5a008bb /oox
parentd4c4a07de9c5bdbeaa43bc82f9b78f397d5249fc (diff)
forcepoint#54 null deref
Change-Id: I9ca04647b16f90bb2d2d4aa0d25b08a09c408fe0 Reviewed-on: https://gerrit.libreoffice.org/58382 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/crypto/CryptTools.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index c507923f7bc9..99fb01fe88d2 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -288,6 +288,8 @@ sal_uInt32 Decrypt::update(std::vector<sal_uInt8>& output, std::vector<sal_uInt8
#endif // USE_TLS_OPENSSL
#if USE_TLS_NSS
+ if (!mpImpl->mContext)
+ return 0;
(void)PK11_CipherOp(mpImpl->mContext, output.data(), &outputLength, actualInputLength, input.data(), actualInputLength);
#endif // USE_TLS_NSS