summaryrefslogtreecommitdiff
path: root/ext/standard/mail.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-01-25 00:26:51 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-01-25 00:26:51 +0000
commit094a5717b1b0b465ec847d8606261398a782c478 (patch)
treef026c99d80b20de5dd0bf10158fd38ca1ffba0f4 /ext/standard/mail.c
parent93951f1931a7bdc9278d41865c8403e5db488e7c (diff)
downloadphp-git-094a5717b1b0b465ec847d8606261398a782c478.tar.gz
Eliminate strcat() and strcpy()
Diffstat (limited to 'ext/standard/mail.c')
-rw-r--r--ext/standard/mail.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index 093c0faee6..d493d1d591 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -200,10 +200,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char
#endif
}
if (extra_cmd != NULL) {
- sendmail_cmd = emalloc (strlen (sendmail_path) + strlen (extra_cmd) + 2);
- strcpy (sendmail_cmd, sendmail_path);
- strcat (sendmail_cmd, " ");
- strcat (sendmail_cmd, extra_cmd);
+ spprintf(&sendmail_cmd, 0, "%s %s", sendmail_path, extra_cmd);
} else {
sendmail_cmd = sendmail_path;
}