aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-08-30 15:33:23 +0200
committerSverker Eriksson <[email protected]>2012-08-30 15:33:23 +0200
commit261f8101567977491c6ca3adccf0d824b9ed9de6 (patch)
tree018937c030517449a36369cc56d35aed3eb31fb2 /lib/crypto
parentcc3e7a0c3865fb58cb7474872f4c4ef0e7e32f39 (diff)
parent2d5d3b964942ab75777d2192fb15668e0f86456d (diff)
downloadotp-261f8101567977491c6ca3adccf0d824b9ed9de6.tar.gz
otp-261f8101567977491c6ca3adccf0d824b9ed9de6.tar.bz2
otp-261f8101567977491c6ca3adccf0d824b9ed9de6.zip
Merge branch 'sverk/crypto-rsa_sign-fix' into maint
* sverk/crypto-rsa_sign-fix: crypto: Fix buffer overflow bug in rsa_sign
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/c_src/crypto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index a24747a872..91ab244620 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -1875,7 +1875,7 @@ static int get_rsa_private_key(ErlNifEnv* env, ERL_NIF_TERM key, RSA *rsa)
static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Type, Data|{digest,Digest}, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C]) */
ErlNifBinary data_bin, ret_bin;
- unsigned char hmacbuf[SHA_DIGEST_LENGTH];
+ unsigned char hmacbuf[SHA512_LEN];
unsigned rsa_s_len;
RSA* rsa;
int i;