From: gilles Date: Sat, 19 Apr 2014 17:45:05 +0000 (+0000) Subject: (void) cast snprintf() call used to craft fatalx() message from within X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dd7aa8c7d32fab51fa4df98f404f5a8f3421a425;p=openbsd (void) cast snprintf() call used to craft fatalx() message from within smtpd, buffer is large enough and truncation harmless, we want to avoid memory allocation in that case and use a best-effort --- diff --git a/usr.sbin/smtpd/mproc.c b/usr.sbin/smtpd/mproc.c index 4be3d61c1a2..a5223d61e0c 100644 --- a/usr.sbin/smtpd/mproc.c +++ b/usr.sbin/smtpd/mproc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mproc.c,v 1.7 2013/12/26 17:25:32 eric Exp $ */ +/* $OpenBSD: mproc.c,v 1.8 2014/04/19 17:45:05 gilles Exp $ */ /* * Copyright (c) 2012 Eric Faurot @@ -424,7 +424,7 @@ m_error(const char *error) { char buf[512]; - snprintf(buf, sizeof buf, "%s: %s: %s", + (void)snprintf(buf, sizeof buf, "%s: %s: %s", proc_name(smtpd_process), imsg_to_str(current->hdr.type), error);