diff options
author | millert <millert@openbsd.org> | 2020-03-16 23:34:02 +0000 |
---|---|---|
committer | millert <millert@openbsd.org> | 2020-03-16 23:34:02 +0000 |
commit | 2065b0f48c0d2f0762c2a96a46ed6151eb907c52 (patch) | |
tree | ddc0ff939a774044eab47023ebaaa1cac1eefd80 | |
parent | Add missing casts to unsigned char when using ctype(3). (diff) | |
download | OpenSMTPD-2065b0f48c0d2f0762c2a96a46ed6151eb907c52.tar.xz OpenSMTPD-2065b0f48c0d2f0762c2a96a46ed6151eb907c52.zip |
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@
-rw-r--r-- | mail.lmtp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mail.lmtp.c b/mail.lmtp.c index c7dc46d5..4bab03f8 100644 --- a/mail.lmtp.c +++ b/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) { |