From 5dc5ee615ada534d7c4f284d2ae679ce1b18a6f5 Mon Sep 17 00:00:00 2001 From: gilles Date: Sat, 19 Apr 2014 16:50:28 +0000 Subject: [PATCH] (void) cast strlcpy() that cannot truncate, dns.c ensures the reply will fit in the buffer before returning the answer --- usr.sbin/smtpd/smtp_session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 868a57e1c58..f879a11d38d 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.202 2014/04/19 16:44:01 gilles Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.203 2014/04/19 16:50:28 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -315,7 +315,7 @@ smtp_session_imsg(struct mproc *p, struct imsg *imsg) m_get_string(&m, &line); m_end(&m); s = tree_xpop(&wait_lka_ptr, reqid); - strlcpy(s->hostname, line, sizeof s->hostname); + (void)strlcpy(s->hostname, line, sizeof s->hostname); if (smtp_lookup_servername(s)) smtp_connected(s); return; -- 2.20.1