diff options
author | markm <markm@FreeBSD.org> | 2003-01-28 21:43:22 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-01-28 21:43:22 +0000 |
commit | aad1d64cb5a8d9b503d9199642363dc1e92d2f9b (patch) | |
tree | 610a51c6e3965764fb0f1629c1376e2d23afffe8 /crypto/openssl/crypto/bio/b_print.c | |
parent | eba366e36e93f5da8ae5c744eb337c3ef6872641 (diff) | |
download | FreeBSD-src-aad1d64cb5a8d9b503d9199642363dc1e92d2f9b.zip FreeBSD-src-aad1d64cb5a8d9b503d9199642363dc1e92d2f9b.tar.gz |
Vendor import of OpenSSL release 0.9.7. This release includes
support for AES and OpenBSD's hardware crypto.
Diffstat (limited to 'crypto/openssl/crypto/bio/b_print.c')
-rw-r--r-- | crypto/openssl/crypto/bio/b_print.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/openssl/crypto/bio/b_print.c b/crypto/openssl/crypto/bio/b_print.c index fa4e350..3f5d6a7 100644 --- a/crypto/openssl/crypto/bio/b_print.c +++ b/crypto/openssl/crypto/bio/b_print.c @@ -116,7 +116,7 @@ #endif #if HAVE_LONG_LONG -# if defined(WIN32) && !defined(__GNUC__) +# if defined(OPENSSL_SYS_WIN32) && !defined(__GNUC__) # define LLONG _int64 # else # define LLONG long long @@ -483,7 +483,7 @@ fmtint( { int signvalue = 0; unsigned LLONG uvalue; - char convert[20]; + char convert[DECIMAL_SIZE(value)+1]; int place = 0; int spadlen = 0; int zpadlen = 0; @@ -508,8 +508,8 @@ fmtint( (caps ? "0123456789ABCDEF" : "0123456789abcdef") [uvalue % (unsigned) base]; uvalue = (uvalue / (unsigned) base); - } while (uvalue && (place < 20)); - if (place == 20) + } while (uvalue && (place < sizeof convert)); + if (place == sizeof convert) place--; convert[place] = 0; @@ -641,8 +641,8 @@ fmtfp( (caps ? "0123456789ABCDEF" : "0123456789abcdef")[intpart % 10]; intpart = (intpart / 10); - } while (intpart && (iplace < 20)); - if (iplace == 20) + } while (intpart && (iplace < sizeof iplace)); + if (iplace == sizeof iplace) iplace--; iconvert[iplace] = 0; @@ -653,7 +653,7 @@ fmtfp( : "0123456789abcdef")[fracpart % 10]; fracpart = (fracpart / 10); } while (fplace < max); - if (fplace == 20) + if (fplace == sizeof fplace) fplace--; fconvert[fplace] = 0; |