summaryrefslogtreecommitdiffstats
path: root/comphelper/source/misc/storagehelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/storagehelper.cxx')
-rw-r--r--comphelper/source/misc/storagehelper.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 9d3dbcd227..1d504cb917 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -390,6 +390,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData(
catch ( uno::Exception& )
{
TOOLS_WARN_EXCEPTION("comphelper", "Can not create SHA256 digest!" );
+ throw; // tdf#159519 DO NOT RETURN SUCCESS
}
// MS_1252 encoding was used for SO60 document format password encoding,
@@ -446,7 +447,10 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreateGpgPackageEncryptionDat
// get 32 random chars out of it
uno::Sequence < sal_Int8 > aVector(32);
- rtl_random_getBytes( aRandomPool, aVector.getArray(), aVector.getLength() );
+ if (rtl_random_getBytes(aRandomPool, aVector.getArray(), aVector.getLength()) != rtl_Random_E_None)
+ {
+ throw uno::RuntimeException("rtl_random_getBytes failed");
+ }
rtl_random_destroyPool(aRandomPool);