From: gilles Date: Sat, 19 Apr 2014 14:09:19 +0000 (+0000) Subject: (void) cast a snprintf() call that can't possibly truncate unless we X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=45a8e1718f1bf6548342a08c3a65a53cf1fa3431;p=openbsd (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 --- 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));