X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbn%2Fbn_print.c;h=39fb03412e5569eb77400129ce4670dbee7afb82;hp=e5f641b99dd73f06a21a32d7041690db1899dc4b;hb=2338ad88859313922e3a861e07aec441a90464de;hpb=fa515410aae2cf4ced2cf41cc6715fee6c6db344 diff --git a/crypto/bn/bn_print.c b/crypto/bn/bn_print.c index e5f641b99d..39fb03412e 100644 --- a/crypto/bn/bn_print.c +++ b/crypto/bn/bn_print.c @@ -67,8 +67,8 @@ char *BN_bn2dec(const BIGNUM *a) /*- * get an upper bound for the length of the decimal integer * num <= (BN_num_bits(a) + 1) * log(2) - * <= 3 * BN_num_bits(a) * 0.1001 + log(2) + 1 (rounding error) - * <= BN_num_bits(a)/10 + BN_num_bits/1000 + 1 + 1 + * <= 3 * BN_num_bits(a) * 0.101 + log(2) + 1 (rounding error) + * <= 3 * BN_num_bits(a) / 10 + 3 * BN_num_bits / 1000 + 1 + 1 */ i = BN_num_bits(a) * 3; num = (i / 10 + i / 1000 + 1) + 1;