From 05ec6aa2d59efcf4c489bd3d7decd83be384157c Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Wed, 2 Nov 2005 01:36:09 +0000 Subject: [PATCH] gota use len in BN_bin2bn --- common/ssl_calls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/ssl_calls.c b/common/ssl_calls.c index 4edd68ab..9a1a3f1c 100644 --- a/common/ssl_calls.c +++ b/common/ssl_calls.c @@ -182,9 +182,9 @@ g_mod_exp(char* out, int out_len, char* in, int in_len, BN_init(&lexp); BN_init(&lin); BN_init(&lout); - BN_bin2bn((unsigned char*)l_mod, 64, &lmod); - BN_bin2bn((unsigned char*)l_exp, 64, &lexp); - BN_bin2bn((unsigned char*)l_in, 64, &lin); + BN_bin2bn((unsigned char*)l_mod, mod_len, &lmod); + BN_bin2bn((unsigned char*)l_exp, exp_len, &lexp); + BN_bin2bn((unsigned char*)l_in, in_len, &lin); BN_mod_exp(&lout, &lin, &lexp, &lmod, ctx); rv = BN_bn2bin(&lout, (unsigned char*)l_out); if (rv <= out_len)