diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-07 16:00:17 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-12-07 21:46:00 +0100 |
commit | 328b135f0decbab475c16560f4b366559f2d0e66 (patch) | |
tree | 20f314312a3333549553dfa84b03e522fa5bd755 /xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | |
parent | 1c93df52e522f4055fa7b4dd5de3c13fa9dc52d9 (diff) |
xmlsecurity: check for errors in OCipherContext::Create()
If this function returns null, storing a document will proceed without
reporting an error to the user, and lose all the data.
Change-Id: I0f9fd53702321e7997b28e12eb5bed3349bbcc13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160435
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'xmlsecurity/source/xmlsec/nss/nssinitializer.cxx')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx index 69e165c550fc..83a83a9ea551 100644 --- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx +++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx @@ -606,6 +606,7 @@ css::uno::Reference< css::xml::crypto::XCipherContext > SAL_CALL ONSSInitializer throw css::lang::IllegalArgumentException("Unexpected length of initialization vector.", css::uno::Reference< css::uno::XInterface >(), 3 ); xResult = OCipherContext::Create( nNSSCipherID, aKey, aInitializationVector, bEncryption, bW3CPadding ); + assert(xResult.is()); } return xResult; |