X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbio%2Fbio_cb.c;h=f0dfe8268cf8d59767aeac6edf14c4b75e9a1d24;hp=2a447c3f6ce225d88f1793ee7de1bf5a0173aa81;hb=50932c4af2fdd1da01203e9fabe176f9c106882b;hpb=0f113f3ee4d629ef9a4a30911b22b224772085e5 diff --git a/crypto/bio/bio_cb.c b/crypto/bio/bio_cb.c index 2a447c3f6c..f0dfe8268c 100644 --- a/crypto/bio/bio_cb.c +++ b/crypto/bio/bio_cb.c @@ -59,7 +59,7 @@ #include #include #include -#include "cryptlib.h" +#include "internal/cryptlib.h" #include #include @@ -67,17 +67,20 @@ long BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl, long ret) { BIO *b; - MS_STATIC char buf[256]; + 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);