diff options
Diffstat (limited to 'crypto/openssl/crypto/ec/ec_print.c')
-rw-r--r-- | crypto/openssl/crypto/ec/ec_print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/ec/ec_print.c b/crypto/openssl/crypto/ec/ec_print.c index 027a51928aab8..660fc400fb758 100644 --- a/crypto/openssl/crypto/ec/ec_print.c +++ b/crypto/openssl/crypto/ec/ec_print.c @@ -9,7 +9,7 @@ #include <openssl/crypto.h> #include <openssl/err.h> -#include "ec_lcl.h" +#include "ec_local.h" BIGNUM *EC_POINT_point2bn(const EC_GROUP *group, const EC_POINT *point, @@ -39,13 +39,13 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group, EC_POINT *ret; if ((buf_len = BN_num_bytes(bn)) == 0) - return NULL; + buf_len = 1; if ((buf = OPENSSL_malloc(buf_len)) == NULL) { ECerr(EC_F_EC_POINT_BN2POINT, ERR_R_MALLOC_FAILURE); return NULL; } - if (!BN_bn2bin(bn, buf)) { + if (!BN_bn2binpad(bn, buf, buf_len)) { OPENSSL_free(buf); return NULL; } |