From c52b1aafaaead44ed582498ae01421c9181a789a Mon Sep 17 00:00:00 2001
From: bcook <>
Date: Mon, 8 Dec 2014 03:54:19 +0000
Subject: Use platform-defined method of printing a pointer.

Casting a pointer to an unsigned long discards bits on an LLP64 system.

ok deraadt@
---
 src/lib/libcrypto/bio/bio_cb.c         | 4 ++--
 src/lib/libssl/src/crypto/bio/bio_cb.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'src')

diff --git a/src/lib/libcrypto/bio/bio_cb.c b/src/lib/libcrypto/bio/bio_cb.c
index 7d1f025452..ab0e3a92ce 100644
--- a/src/lib/libcrypto/bio/bio_cb.c
+++ b/src/lib/libcrypto/bio/bio_cb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio_cb.c,v 1.15 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: bio_cb.c,v 1.16 2014/12/08 03:54:19 bcook Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -76,7 +76,7 @@ BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl,
 	if (BIO_CB_RETURN & cmd)
 		r = ret;
 
-	snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio);
+	snprintf(buf, sizeof buf, "BIO[%p]:", bio);
 	p = &(buf[14]);
 	p_maxlen = sizeof buf - 14;
 	switch (cmd) {
diff --git a/src/lib/libssl/src/crypto/bio/bio_cb.c b/src/lib/libssl/src/crypto/bio/bio_cb.c
index 7d1f025452..ab0e3a92ce 100644
--- a/src/lib/libssl/src/crypto/bio/bio_cb.c
+++ b/src/lib/libssl/src/crypto/bio/bio_cb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio_cb.c,v 1.15 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: bio_cb.c,v 1.16 2014/12/08 03:54:19 bcook Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -76,7 +76,7 @@ BIO_debug_callback(BIO *bio, int cmd, const char *argp, int argi, long argl,
 	if (BIO_CB_RETURN & cmd)
 		r = ret;
 
-	snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio);
+	snprintf(buf, sizeof buf, "BIO[%p]:", bio);
 	p = &(buf[14]);
 	p_maxlen = sizeof buf - 14;
 	switch (cmd) {
-- 
cgit v1.2.3-55-g6feb