[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Richard Levitte
levitte at openssl.org
Tue Mar 10 11:34:45 UTC 2015
The branch OpenSSL_1_0_2-stable has been updated
via 5a9e9669d8073ddc5efeea08f3daee42509b2aa7 (commit)
from 2b31fcc0b5e7329e13806822a5709dbd51c5c8a4 (commit)
- Log -----------------------------------------------------------------
commit 5a9e9669d8073ddc5efeea08f3daee42509b2aa7
Author: Richard Godbee <richard at godbee.net>
Date: Sun Sep 21 02:14:11 2014 -0400
BIO_debug_callback: Fix output on 64-bit machines
BIO_debug_callback() no longer assumes the hexadecimal representation of
a pointer fits in 8 characters.
Signed-off-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Matt Caswell <matt at openssl.org>
(cherry picked from commit 460e920d8a274e27aab36346eeda6685a42c3314)
-----------------------------------------------------------------------
Summary of changes:
crypto/bio/bio_cb.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c
index 8715f5c..d3e8606 100644
--- a/crypto/bio/bio_cb.c
+++ b/crypto/bio/bio_cb.c
@@ -70,14 +70,17 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
MS_STATIC char buf[256];
char *p;
long r = 1;
+ int len;
size_t p_maxlen;
if (BIO_CB_RETURN & cmd)
r = ret;
- BIO_snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio);
- p = &(buf[14]);
- p_maxlen = sizeof buf - 14;
+ len = BIO_snprintf(buf,sizeof buf,"BIO[%p]: ",(void *)bio);
+
+ p = buf + len;
+ p_maxlen = sizeof(buf) - len;
+
switch (cmd) {
case BIO_CB_FREE:
BIO_snprintf(p, p_maxlen, "Free - %s\n", bio->method->name);
More information about the openssl-commits
mailing list