summaryrefslogtreecommitdiffstats
path: root/comphelper/source/misc/storagehelper.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:30 +0000
commita2baea7faff31d26459dab3668a39eae85e4991b (patch)
treeeaa2048ce9c715481f932dcfe20368e252b77d2f /comphelper/source/misc/storagehelper.cxx
parentAdding upstream version 4:24.2.0. (diff)
downloadlibreoffice-a2baea7faff31d26459dab3668a39eae85e4991b.tar.xz
libreoffice-a2baea7faff31d26459dab3668a39eae85e4991b.zip
Adding upstream version 4:24.2.1.upstream/4%24.2.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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);