Description
I debugged into it. Find when this function(OpenSSLCryptoKeyEC::signBase64SignatureDSA) done, it will free the allocated memory. Then it fails, stop there and do nothing.
I also find this code at 241 line of OpenSSLCryptoKeyEC.cpp file.
unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s)) / 8];
And as the information printed out, the alloc size is smaller than the real use size.
So I change it to "ceil" the integer by unsigned char* rawSigBuf = new unsigned char[(BN_num_bits(dsa_sig->r) + BN_num_bits(dsa_sig->s) + 7) / 8];
Then it works fine. If it is really a bug, please fix it.