diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_print.c | 6 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/bn/bn_print.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c index e3b6aa235b..ad80dab325 100644 --- a/src/lib/libcrypto/bn/bn_print.c +++ b/src/lib/libcrypto/bn/bn_print.c | |||
| @@ -79,7 +79,7 @@ char *BN_bn2hex(const BIGNUM *a) | |||
| 79 | } | 79 | } |
| 80 | p=buf; | 80 | p=buf; |
| 81 | if (a->neg) *(p++)='-'; | 81 | if (a->neg) *(p++)='-'; |
| 82 | if (a->top == 0) *(p++)='0'; | 82 | if (BN_is_zero(a)) *(p++)='0'; |
| 83 | for (i=a->top-1; i >=0; i--) | 83 | for (i=a->top-1; i >=0; i--) |
| 84 | { | 84 | { |
| 85 | for (j=BN_BITS2-8; j >= 0; j-=8) | 85 | for (j=BN_BITS2-8; j >= 0; j-=8) |
| @@ -123,7 +123,7 @@ char *BN_bn2dec(const BIGNUM *a) | |||
| 123 | p=buf; | 123 | p=buf; |
| 124 | lp=bn_data; | 124 | lp=bn_data; |
| 125 | if (t->neg) *(p++)='-'; | 125 | if (t->neg) *(p++)='-'; |
| 126 | if (t->top == 0) | 126 | if (BN_is_zero(t)) |
| 127 | { | 127 | { |
| 128 | *(p++)='0'; | 128 | *(p++)='0'; |
| 129 | *(p++)='\0'; | 129 | *(p++)='\0'; |
| @@ -300,7 +300,7 @@ int BN_print(BIO *bp, const BIGNUM *a) | |||
| 300 | int ret=0; | 300 | int ret=0; |
| 301 | 301 | ||
| 302 | if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end; | 302 | if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end; |
| 303 | if ((a->top == 0) && (BIO_write(bp,"0",1) != 1)) goto end; | 303 | if ((BN_is_zero(a)) && (BIO_write(bp,"0",1) != 1)) goto end; |
| 304 | for (i=a->top-1; i >=0; i--) | 304 | for (i=a->top-1; i >=0; i--) |
| 305 | { | 305 | { |
| 306 | for (j=BN_BITS2-4; j >= 0; j-=4) | 306 | for (j=BN_BITS2-4; j >= 0; j-=4) |
diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c index e3b6aa235b..ad80dab325 100644 --- a/src/lib/libssl/src/crypto/bn/bn_print.c +++ b/src/lib/libssl/src/crypto/bn/bn_print.c | |||
| @@ -79,7 +79,7 @@ char *BN_bn2hex(const BIGNUM *a) | |||
| 79 | } | 79 | } |
| 80 | p=buf; | 80 | p=buf; |
| 81 | if (a->neg) *(p++)='-'; | 81 | if (a->neg) *(p++)='-'; |
| 82 | if (a->top == 0) *(p++)='0'; | 82 | if (BN_is_zero(a)) *(p++)='0'; |
| 83 | for (i=a->top-1; i >=0; i--) | 83 | for (i=a->top-1; i >=0; i--) |
| 84 | { | 84 | { |
| 85 | for (j=BN_BITS2-8; j >= 0; j-=8) | 85 | for (j=BN_BITS2-8; j >= 0; j-=8) |
| @@ -123,7 +123,7 @@ char *BN_bn2dec(const BIGNUM *a) | |||
| 123 | p=buf; | 123 | p=buf; |
| 124 | lp=bn_data; | 124 | lp=bn_data; |
| 125 | if (t->neg) *(p++)='-'; | 125 | if (t->neg) *(p++)='-'; |
| 126 | if (t->top == 0) | 126 | if (BN_is_zero(t)) |
| 127 | { | 127 | { |
| 128 | *(p++)='0'; | 128 | *(p++)='0'; |
| 129 | *(p++)='\0'; | 129 | *(p++)='\0'; |
| @@ -300,7 +300,7 @@ int BN_print(BIO *bp, const BIGNUM *a) | |||
| 300 | int ret=0; | 300 | int ret=0; |
| 301 | 301 | ||
| 302 | if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end; | 302 | if ((a->neg) && (BIO_write(bp,"-",1) != 1)) goto end; |
| 303 | if ((a->top == 0) && (BIO_write(bp,"0",1) != 1)) goto end; | 303 | if ((BN_is_zero(a)) && (BIO_write(bp,"0",1) != 1)) goto end; |
| 304 | for (i=a->top-1; i >=0; i--) | 304 | for (i=a->top-1; i >=0; i--) |
| 305 | { | 305 | { |
| 306 | for (j=BN_BITS2-4; j >= 0; j-=4) | 306 | for (j=BN_BITS2-4; j >= 0; j-=4) |
