2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Set def_mailerflags even if sendmail was not found at configure time.

Fixes a NULL dereference when mailerpath is set but mailerflags is not.
Bug #878
This commit is contained in:
Todd C. Miller
2019-04-19 10:14:10 -06:00
parent de65d70929
commit 9048ee6c48

View File

@@ -621,9 +621,9 @@ init_defaults(void)
#ifdef _PATH_SUDO_SENDMAIL
if ((def_mailerpath = strdup(_PATH_SUDO_SENDMAIL)) == NULL)
goto oom;
#endif
if ((def_mailerflags = strdup("-t")) == NULL)
goto oom;
#endif
#if (LOGGING & SLOG_FILE)
if ((def_logfile = strdup(_PATH_SUDO_LOGFILE)) == NULL)
goto oom;