git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix taint trap in parse_fix_phrase(). Bug 2617
[exim.git]
/
src
/
src
/
exim.c
diff --git
a/src/src/exim.c
b/src/src/exim.c
index dd3a17f14f5199e3aa964428ff494759cbd9b0c6..c0ef9150a3b048d49df73ab3d101fe68ed14fdf9 100644
(file)
--- a/
src/src/exim.c
+++ b/
src/src/exim.c
@@
-564,7
+564,7
@@
for (int i = 0; i <= 2; i++)
{
if (devnull < 0) devnull = open("/dev/null", O_RDWR);
if (devnull < 0) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s",
{
if (devnull < 0) devnull = open("/dev/null", O_RDWR);
if (devnull < 0) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s",
- string_open_failed(
errno,
"/dev/null", NULL));
+ string_open_failed("/dev/null", NULL));
if (devnull != i) (void)dup2(devnull, i);
}
}
if (devnull != i) (void)dup2(devnull, i);
}
}
@@
-4758,16
+4758,16
@@
for (i = 0;;)
configuration specifies something to use. When running in the test harness,
any setting of unknown_login overrides the actual name. */
configuration specifies something to use. When running in the test harness,
any setting of unknown_login overrides the actual name. */
-if (
originator_login == NULL
|| f.running_in_test_harness)
+if (
!originator_login
|| f.running_in_test_harness)
{
{
- if (unknown_login
!= NULL
)
+ if (unknown_login)
{
originator_login = expand_string(unknown_login);
{
originator_login = expand_string(unknown_login);
- if (
originator_name == NULL && unknown_username != NULL
)
+ if (
!originator_name && unknown_username
)
originator_name = expand_string(unknown_username);
originator_name = expand_string(unknown_username);
- if (
originator_name == NULL
) originator_name = US"";
+ if (
!originator_name
) originator_name = US"";
}
}
- if (
originator_login == NULL
)
+ if (
!originator_login
)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Failed to get user name for uid %d",
(int)real_uid);
}
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Failed to get user name for uid %d",
(int)real_uid);
}
@@
-4775,8
+4775,7
@@
if (originator_login == NULL || f.running_in_test_harness)
/* Ensure that the user name is in a suitable form for use as a "phrase" in an
RFC822 address.*/
/* Ensure that the user name is in a suitable form for use as a "phrase" in an
RFC822 address.*/
-originator_name = string_copy(parse_fix_phrase(originator_name,
- Ustrlen(originator_name), big_buffer, big_buffer_size));
+originator_name = parse_fix_phrase(originator_name, Ustrlen(originator_name));
/* If a message is created by this call of Exim, the uid/gid of its originator
are those of the caller. These values are overridden if an existing message is
/* If a message is created by this call of Exim, the uid/gid of its originator
are those of the caller. These values are overridden if an existing message is