summaryrefslogtreecommitdiffstats
path: root/comphelper/source/misc/docpasswordhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/docpasswordhelper.cxx')
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 0adb6eff9a..1f73bd8d70 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -427,7 +427,10 @@ OUString DocPasswordHelper::GetOoxHashAsBase64(
uno::Sequence< sal_Int8 > aResult( nLength );
rtlRandomPool aRandomPool = rtl_random_createPool ();
- rtl_random_getBytes ( aRandomPool, aResult.getArray(), nLength );
+ if (rtl_random_getBytes(aRandomPool, aResult.getArray(), nLength) != rtl_Random_E_None)
+ {
+ throw uno::RuntimeException("rtl_random_getBytes failed");
+ }
rtl_random_destroyPool ( aRandomPool );
return aResult;