From d86c414f1a2a495b6d205f1dfbefc618efc58722 Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 5 Aug 2016 17:25:51 +0000 Subject: [PATCH] Do not *printf %s NULL ok bcook --- lib/libcrypto/conf/conf_lib.c | 5 +++-- lib/libssl/src/crypto/conf/conf_lib.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/libcrypto/conf/conf_lib.c b/lib/libcrypto/conf/conf_lib.c index a7c8be7c0d8..c7e026e7257 100644 --- a/lib/libcrypto/conf/conf_lib.c +++ b/lib/libcrypto/conf/conf_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_lib.c,v 1.13 2015/02/07 13:19:15 doug Exp $ */ +/* $OpenBSD: conf_lib.c,v 1.14 2016/08/05 17:25:51 deraadt Exp $ */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2000. */ @@ -321,7 +321,8 @@ NCONF_get_string(const CONF *conf, const char *group, const char *name) return NULL; } CONFerr(CONF_F_NCONF_GET_STRING, CONF_R_NO_VALUE); - ERR_asprintf_error_data("group=%s name=%s", group, name); + ERR_asprintf_error_data("group=%s name=%s", + group ? group : "", name); return NULL; } diff --git a/lib/libssl/src/crypto/conf/conf_lib.c b/lib/libssl/src/crypto/conf/conf_lib.c index a7c8be7c0d8..c7e026e7257 100644 --- a/lib/libssl/src/crypto/conf/conf_lib.c +++ b/lib/libssl/src/crypto/conf/conf_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_lib.c,v 1.13 2015/02/07 13:19:15 doug Exp $ */ +/* $OpenBSD: conf_lib.c,v 1.14 2016/08/05 17:25:51 deraadt Exp $ */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2000. */ @@ -321,7 +321,8 @@ NCONF_get_string(const CONF *conf, const char *group, const char *name) return NULL; } CONFerr(CONF_F_NCONF_GET_STRING, CONF_R_NO_VALUE); - ERR_asprintf_error_data("group=%s name=%s", group, name); + ERR_asprintf_error_data("group=%s name=%s", + group ? group : "", name); return NULL; } -- 2.20.1