Skip to content

Commit

Permalink
Merge branch 'sverk/crypto-rsa_sign-fix' into maint
Browse files Browse the repository at this point in the history
* sverk/crypto-rsa_sign-fix:
  crypto: Fix buffer overflow bug in rsa_sign
  • Loading branch information
sverker committed Aug 30, 2012
2 parents cc3e7a0 + 2d5d3b9 commit 261f810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/crypto/c_src/crypto.c
Expand Up @@ -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;
Expand Down

0 comments on commit 261f810

Please sign in to comment.