summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-04-28 21:56:46 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-04-28 21:56:46 +0000
commitb36e7a12d5f89e70f25450d36a70137e38d5cecc (patch)
tree7e046bfa56a2e31c3e4bfc534799c8e1cd58b9b7 /usr.sbin/smtpd
parent3c31b5ff6965de3924e854023728360799c56b44 (diff)
don't use strlcpy before calling a function that uses strlcpy
internally anyway; ok gilles@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/smtp_session.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c
index 92565050d93..8f598f88ca7 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.78 2009/04/28 21:55:16 jacekm Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.79 2009/04/28 21:56:45 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -354,8 +354,6 @@ session_rfc5321_noop_handler(struct session *s, char *args)
int
session_rfc5321_mail_handler(struct session *s, char *args)
{
- char buffer[MAX_PATH_SIZE];
-
if (s->s_state == S_GREETED) {
session_respond(s, "503 Polite people say HELO first");
return 1;
@@ -366,12 +364,7 @@ session_rfc5321_mail_handler(struct session *s, char *args)
return 1;
}
- if (strlcpy(buffer, args, sizeof(buffer)) >= sizeof(buffer)) {
- session_respond(s, "553 Sender address syntax error");
- return 1;
- }
-
- if (! session_set_path(&s->s_msg.sender, buffer)) {
+ if (! session_set_path(&s->s_msg.sender, args)) {
/* No need to even transmit to MFA, path is invalid */
session_respond(s, "553 Sender address syntax error");
return 1;
@@ -393,8 +386,6 @@ session_rfc5321_mail_handler(struct session *s, char *args)
int
session_rfc5321_rcpt_handler(struct session *s, char *args)
{
- char buffer[MAX_PATH_SIZE];
-
if (s->s_state == S_GREETED) {
session_respond(s, "503 Polite people say HELO first");
return 1;
@@ -405,12 +396,7 @@ session_rfc5321_rcpt_handler(struct session *s, char *args)
return 1;
}
- if (strlcpy(buffer, args, sizeof(buffer)) >= sizeof(buffer)) {
- session_respond(s, "553 Recipient address syntax error");
- return 1;
- }
-
- if (! session_set_path(&s->s_msg.session_rcpt, buffer)) {
+ if (! session_set_path(&s->s_msg.session_rcpt, args)) {
/* No need to even transmit to MFA, path is invalid */
session_respond(s, "553 Recipient address syntax error");
return 1;
@@ -418,7 +404,6 @@ session_rfc5321_rcpt_handler(struct session *s, char *args)
s->s_state = S_RCPTREQUEST;
-
if (s->s_flags & F_AUTHENTICATED) {
s->s_msg.flags |= F_MESSAGE_AUTHENTICATED;
}