From a136a215cc085da2472b7cd0f2ad68850f010595 Mon Sep 17 00:00:00 2001
From: guenther <>
Date: Sun, 20 Jul 2014 02:24:21 +0000
Subject: Mark the format string argument to BIO_*printf as not being allowed
 to be NULL

ok bcook@
---
 src/lib/libcrypto/bio/bio.h         | 12 +++++++-----
 src/lib/libssl/src/crypto/bio/bio.h | 12 +++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index dc9c9b9e14..6868959599 100644
--- a/src/lib/libcrypto/bio/bio.h
+++ b/src/lib/libcrypto/bio/bio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio.h,v 1.26 2014/07/13 14:13:27 beck Exp $ */
+/* $OpenBSD: bio.h,v 1.27 2014/07/20 02:24:21 guenther Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -737,16 +737,18 @@ void BIO_copy_next_retry(BIO *b);
 
 int
 BIO_printf(BIO *bio, const char *format, ...)
-	__attribute__((__format__(__printf__, 2, 3)));
+	__attribute__((__format__(__printf__, 2, 3), __nonnull__(2)));
 int
 BIO_vprintf(BIO *bio, const char *format, va_list args)
-	__attribute__((__format__(__printf__, 2, 0)));
+	__attribute__((__format__(__printf__, 2, 0), __nonnull__(2)));
 int
 BIO_snprintf(char *buf, size_t n, const char *format, ...)
-	__attribute__((deprecated, __format__(__printf__, 3, 4)));
+	__attribute__((__deprecated__, __format__(__printf__, 3, 4),
+	    __nonnull__(3)));
 int
 BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
-	__attribute__((deprecated, __format__(__printf__, 3, 0)));
+	__attribute__((__deprecated__, __format__(__printf__, 3, 0),
+	    __nonnull__(3)));
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
diff --git a/src/lib/libssl/src/crypto/bio/bio.h b/src/lib/libssl/src/crypto/bio/bio.h
index dc9c9b9e14..6868959599 100644
--- a/src/lib/libssl/src/crypto/bio/bio.h
+++ b/src/lib/libssl/src/crypto/bio/bio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio.h,v 1.26 2014/07/13 14:13:27 beck Exp $ */
+/* $OpenBSD: bio.h,v 1.27 2014/07/20 02:24:21 guenther Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -737,16 +737,18 @@ void BIO_copy_next_retry(BIO *b);
 
 int
 BIO_printf(BIO *bio, const char *format, ...)
-	__attribute__((__format__(__printf__, 2, 3)));
+	__attribute__((__format__(__printf__, 2, 3), __nonnull__(2)));
 int
 BIO_vprintf(BIO *bio, const char *format, va_list args)
-	__attribute__((__format__(__printf__, 2, 0)));
+	__attribute__((__format__(__printf__, 2, 0), __nonnull__(2)));
 int
 BIO_snprintf(char *buf, size_t n, const char *format, ...)
-	__attribute__((deprecated, __format__(__printf__, 3, 4)));
+	__attribute__((__deprecated__, __format__(__printf__, 3, 4),
+	    __nonnull__(3)));
 int
 BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
-	__attribute__((deprecated, __format__(__printf__, 3, 0)));
+	__attribute__((__deprecated__, __format__(__printf__, 3, 0),
+	    __nonnull__(3)));
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
-- 
cgit v1.2.3-55-g6feb