diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-10-15 10:38:10 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-10-16 11:15:41 +0200 |
commit | b5ec5a4b886a2ba224f4b7f5f2d92b007f199f57 (patch) | |
tree | 8474eb308687f951293144d5922384b7d3825455 /comphelper | |
parent | feb7596dc404b8b42a603722fe36f9f904230032 (diff) |
comphelper: fix bad error handling in CreatePackageEncryptionData()
Not sure if rtl_digest_SHA1 can realistically return an error but avoid
out-of-bounds write in this case.
(regression from commit 9188ea83c346fdc2f668178ae7538665a1b09c02)
Change-Id: If5f134cbcd9236338d1938242a469d7c79e87f06
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123649
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 62128c09237152d9e0585abe2fc88f0a13274b34)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123629
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/storagehelper.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index cee15b1cbcb9..aeebf53e4015 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -430,7 +430,7 @@ uno::Sequence< beans::NamedValue > OStorageHelper::CreatePackageEncryptionData( if ( nError != rtl_Digest_E_None ) { aEncryptionData.realloc( nSha1Ind ); - break; + return aEncryptionData; } // coverity[overrun-buffer-arg : FALSE] - coverity has difficulty with css::uno::Sequence |