From dd7aa8c7d32fab51fa4df98f404f5a8f3421a425 Mon Sep 17 00:00:00 2001 From: gilles Date: Sat, 19 Apr 2014 17:45:05 +0000 Subject: [PATCH] (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 --- usr.sbin/smtpd/mproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.20.1