From 45a8e1718f1bf6548342a08c3a65a53cf1fa3431 Mon Sep 17 00:00:00 2001 From: gilles Date: Sat, 19 Apr 2014 14:09:19 +0000 Subject: [PATCH] (void) cast a snprintf() call that can't possibly truncate unless we suddenly supported a cipher with a name that's > 200 bytes long ... ... in which case harmless truncation would occur and we'd have to readjust our buffer --- usr.sbin/smtpd/ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/smtpd/ssl.c b/usr.sbin/smtpd/ssl.c index 9c188ccdd4e..ad24e54845f 100644 --- a/usr.sbin/smtpd/ssl.c +++ b/usr.sbin/smtpd/ssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.c,v 1.60 2014/02/17 19:50:09 eric Exp $ */ +/* $OpenBSD: ssl.c,v 1.61 2014/04/19 14:09:19 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard @@ -323,7 +323,7 @@ ssl_to_text(const SSL *ssl) { static char buf[256]; - snprintf(buf, sizeof buf, "version=%s, cipher=%s, bits=%d", + (void)snprintf(buf, sizeof buf, "version=%s, cipher=%s, bits=%d", SSL_get_cipher_version(ssl), SSL_get_cipher_name(ssl), SSL_get_cipher_bits(ssl, NULL)); -- 2.20.1