commit | 66adbe68822359087f72965ebc81ebfd7258f630 | [log] [tgz] |
---|---|---|
author | Scott Cantor <scantor@apache.org> | Thu Jan 29 03:11:28 2015 +0000 |
committer | Scott Cantor <scantor@apache.org> | Thu Jan 29 03:11:28 2015 +0000 |
tree | 274be74ab14330080d0cadbc642db608852024dd | |
parent | 391c90976dcce5eb6d8ff8dc9513f62ad4ee8a0f [diff] |
https://issues.apache.org/jira/browse/SANTUARIO-384 git-svn-id: https://svn.apache.org/repos/asf/santuario/xml-security-cpp/trunk@1655515 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp b/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp index 1ad2637..6030dbf 100644 --- a/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp +++ b/xsec/enc/OpenSSL/OpenSSLCryptoKeyDSA.cpp
@@ -277,7 +277,7 @@ // Now turn the signature into a base64 string - unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s)) / 8]; + unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s) + 7) / 8]; ArrayJanitor<unsigned char> j_sigbuf(rawSigBuf); unsigned int rawLen = BN_bn2bin(dsa_sig->r, rawSigBuf);
diff --git a/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp b/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp index ce93255..6d34e59 100644 --- a/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp +++ b/xsec/enc/OpenSSL/OpenSSLCryptoKeyEC.cpp
@@ -238,7 +238,7 @@ } // Now turn the signature into a base64 string - unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s)) / 8]; + unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s) + 7) / 8]; ArrayJanitor<unsigned char> j_sigbuf(rawSigBuf); unsigned int rawLen = BN_bn2bin(dsa_sig->r, rawSigBuf);