aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/bio/bio_cb.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/bio/bio_cb.c')
-rw-r--r--openssl/crypto/bio/bio_cb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/openssl/crypto/bio/bio_cb.c b/openssl/crypto/bio/bio_cb.c
index 8715f5cbc..d3e860686 100644
--- a/openssl/crypto/bio/bio_cb.c
+++ b/openssl/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);