From 7a9a779899d8ef1f48e2b9bce7cf5cca8f57dd6e Mon Sep 17 00:00:00 2001 From: gilles Date: Sat, 19 Apr 2014 13:52:49 +0000 Subject: [PATCH] (cast) void two strlcpy() and a snprintf() that cannot truncate --- usr.sbin/smtpd/smtp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/smtpd/smtp.c b/usr.sbin/smtpd/smtp.c index 66cc00ef30f..5c673888ddb 100644 --- a/usr.sbin/smtpd/smtp.c +++ b/usr.sbin/smtpd/smtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp.c,v 1.135 2014/04/09 18:55:19 eric Exp $ */ +/* $OpenBSD: smtp.c,v 1.136 2014/04/19 13:52:49 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -248,10 +248,10 @@ smtp_enqueue(uid_t *euid) if (listener == NULL) { listener = &local; - strlcpy(listener->tag, "local", sizeof(listener->tag)); + (void)strlcpy(listener->tag, "local", sizeof(listener->tag)); listener->ss.ss_family = AF_LOCAL; listener->ss.ss_len = sizeof(struct sockaddr *); - strlcpy(listener->hostname, "localhost", + (void)strlcpy(listener->hostname, "localhost", sizeof(listener->hostname)); } @@ -269,7 +269,7 @@ smtp_enqueue(uid_t *euid) hostname = "localhost"; if (euid) { - snprintf(buf, sizeof(buf), "%d@localhost", *euid); + (void)snprintf(buf, sizeof(buf), "%d@localhost", *euid); hostname = buf; } -- 2.20.1