From: gilles Date: Sat, 19 Apr 2014 11:41:49 +0000 (+0000) Subject: these strlcpy can't truncate, the copy is from a buffer to a buffer of same X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4c0beb722c1c31aecef89aa68182b14cf7f370b2;p=openbsd these strlcpy can't truncate, the copy is from a buffer to a buffer of same size and the first buffer handles the truncation already --- diff --git a/usr.sbin/smtpd/dns.c b/usr.sbin/smtpd/dns.c index b45461a7daa..1e3ad83fd07 100644 --- a/usr.sbin/smtpd/dns.c +++ b/usr.sbin/smtpd/dns.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dns.c,v 1.76 2014/04/04 16:10:42 eric Exp $ */ +/* $OpenBSD: dns.c,v 1.77 2014/04/19 11:41:49 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -223,7 +223,7 @@ dns_imsg(struct mproc *p, struct imsg *imsg) case IMSG_MTA_DNS_MX: m_get_string(&m, &domain); m_end(&m); - strlcpy(s->name, domain, sizeof(s->name)); + (void)strlcpy(s->name, domain, sizeof(s->name)); sa = (struct sockaddr *)&ss; sl = sizeof(ss); @@ -261,7 +261,7 @@ dns_imsg(struct mproc *p, struct imsg *imsg) m_get_string(&m, &domain); m_get_string(&m, &mx); m_end(&m); - strlcpy(s->name, mx, sizeof(s->name)); + (void)strlcpy(s->name, mx, sizeof(s->name)); sa = (struct sockaddr *)&ss; sl = sizeof(ss);