You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Release 1.7.2 (fedora) an AARCH64 (Raspberry PI 4)
I have configured in anacrontab with MAILTO=root
Nevertheless the email with console output is not send.
It is failing with: Syntax error in mailbox address "p+?t??" (non-printable character)
...
Tried to mail output of job `cron.weekly', but mailer process (/usr/sbin/sendmail) exited with status 64
The reason seems to be that in runjob.c:launch_job a pointer to a local reference is stored in jr->mailto.
According to documentation the output of getenv might get invalidated when getenv is called again (see posix standard)
I have the feeling that the address might also get invalidated after fork (before fork the mailto address seems still to be valid)
I think strdup should be used to store the result of getenv.
A local workaround by adding strdup in line 365 jr->mailto = strdup(mailto);
seems to solve the problem for me. Unfortunately this will lead to a memory leak as _jr->mailto is never released.
The text was updated successfully, but these errors were encountered:
Release 1.7.2 (fedora) an AARCH64 (Raspberry PI 4)
I have configured in anacrontab with MAILTO=root
Nevertheless the email with console output is not send.
It is failing with:
Syntax error in mailbox address "p+?t??" (non-printable character)
...
Tried to mail output of job `cron.weekly', but mailer process (/usr/sbin/sendmail) exited with status 64
The reason seems to be that in runjob.c:launch_job a pointer to a local reference is stored in jr->mailto.
According to documentation the output of getenv might get invalidated when getenv is called again (see posix standard)
I have the feeling that the address might also get invalidated after fork (before fork the mailto address seems still to be valid)
I think strdup should be used to store the result of getenv.
A local workaround by adding strdup in line 365
jr->mailto = strdup(mailto);
seems to solve the problem for me. Unfortunately this will lead to a memory leak as _jr->mailto is never released.
The text was updated successfully, but these errors were encountered: