diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2020-03-16 23:34:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2020-03-16 23:34:03 +0000 |
commit | 0705f9366851555f863e1ed8b01879f818b5a3e6 (patch) | |
tree | 0d6c33bb3a0b8e8b021872242505db71e786a6f8 /usr.sbin | |
parent | 1c2a48249f00e46981f2fe00a11e507a64b5f1ea (diff) |
Initialize session.rcptto to NULL before parsing command line optinos.
Otherwise, if neither -r nor -u is specified, it will be used uninitialized.
Found by tobhe@; OK tobhe@ deraadt@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/mail.lmtp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.sbin/smtpd/mail.lmtp.c b/usr.sbin/smtpd/mail.lmtp.c index c7dc46d5ec3..4bab03f86ba 100644 --- a/usr.sbin/smtpd/mail.lmtp.c +++ b/usr.sbin/smtpd/mail.lmtp.c @@ -64,6 +64,7 @@ main(int argc, char *argv[]) session.lhlo = "localhost"; session.mailfrom = getenv("SENDER"); + session.rcptto = NULL; while ((ch = getopt(argc, argv, "d:l:f:ru")) != -1) { switch (ch) { |