summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/mda.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2011-12-18 18:43:31 +0000
committerEric Faurot <eric@cvs.openbsd.org>2011-12-18 18:43:31 +0000
commit95ece4d7a3f30a21320901b87ca4e068505cfa84 (patch)
tree3b14b7fb088bcbd99783ca6b38cddcf09147a9fd /usr.sbin/smtpd/mda.c
parent6cf7544bfe16414bf7f964a06f6a085f7505f5f4 (diff)
- use envelope_set_errormsg() where possible.
- make it use sizeof() rather than a hardcoded limit. ok chl@ gilles@
Diffstat (limited to 'usr.sbin/smtpd/mda.c')
-rw-r--r--usr.sbin/smtpd/mda.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/mda.c b/usr.sbin/smtpd/mda.c
index 0fa9e49be93..ed3ee873ac2 100644
--- a/usr.sbin/smtpd/mda.c
+++ b/usr.sbin/smtpd/mda.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mda.c,v 1.64 2011/12/13 21:44:47 gilles Exp $ */
+/* $OpenBSD: mda.c,v 1.65 2011/12/18 18:43:30 eric Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -201,8 +201,7 @@ mda_imsg(struct imsgev *iev, struct imsg *imsg)
if (error == NULL)
s->msg.status = DS_ACCEPTED;
else
- strlcpy(s->msg.errorline, error,
- sizeof s->msg.errorline);
+ envelope_set_errormsg(&s->msg, "%s", error);
imsg_compose_event(env->sc_ievs[PROC_QUEUE],
IMSG_QUEUE_MESSAGE_UPDATE, 0, 0, -1, &s->msg,
sizeof s->msg);