diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-09 13:04:56 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-09 13:50:38 +0200 |
commit | f0ae58552b2a5d27b90e382914b492f679f581b0 (patch) | |
tree | 49ab2830e9729dda4099f88e353080433626a794 /vcl/source/gdi/pdfwriter_impl2.cxx | |
parent | 7ea8a4e74381de7c904ea49eabff03b4d4fd9e5f (diff) |
clang-analyzer-deadcode.DeadStores
...assuming the success of both steps 2 and 3 should be checked (though the of
this code is lost to history past 40d960cbdba0dbd445d624f62a523b7e78d5f5c9
"divide pdfwriter_impl.cxx")
Change-Id: Icea5de98e5a0559dbc0f837650e842fb49bc41e0
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl2.cxx')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 3650b4d807fe..3dd7441dee52 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -1510,13 +1510,12 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter, //step6, initialize the last 16 bytes of the encrypted user password to 0 for(sal_uInt32 i = MD5_DIGEST_SIZE; i < sal_uInt32(io_rProperties.UValue.size()); i++) io_rProperties.UValue[i] = 0; - //step 2 - rtlDigestError nError = rtl_digest_updateMD5( aDigest, s_nPadString, sizeof( s_nPadString ) ); - //step 3 - if( nError == rtl_Digest_E_None ) - nError = rtl_digest_updateMD5( aDigest, &io_rProperties.DocumentIdentifier[0], sal_Int32(io_rProperties.DocumentIdentifier.size()) ); - else + //steps 2 and 3 + if (rtl_digest_updateMD5( aDigest, s_nPadString, sizeof( s_nPadString ) ) != rtl_Digest_E_None + || rtl_digest_updateMD5( aDigest, &io_rProperties.DocumentIdentifier[0], sal_Int32(io_rProperties.DocumentIdentifier.size()) ) != rtl_Digest_E_None) + { bSuccess = false; + } sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ]; rtl_digest_getMD5( aDigest, nMD5Sum, sizeof(nMD5Sum) ); |