aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2020-03-16 23:34:02 +0000
committermillert <millert@openbsd.org>2020-03-16 23:34:02 +0000
commit2065b0f48c0d2f0762c2a96a46ed6151eb907c52 (patch)
treeddc0ff939a774044eab47023ebaaa1cac1eefd80
parentAdd missing casts to unsigned char when using ctype(3). (diff)
downloadOpenSMTPD-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.c1
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) {