summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-01-16 00:11:53 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-01-16 00:11:53 +0000
commit42e3e2e12e34fba15322a5f872c2eef84be4f442 (patch)
tree2d48b7f919768d2bc0c96de5f28c5d9883adf2d2
parent82dc6e1cfbc2eacc388bae7e06b9bfc1b0ef7313 (diff)
downloadphp-git-42e3e2e12e34fba15322a5f872c2eef84be4f442.tar.gz
Added buffer length checks
-rw-r--r--win32/sendmail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/sendmail.c b/win32/sendmail.c
index d893a1b84c..a7b6f839a5 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -486,7 +486,7 @@ static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char
while(token != NULL)
{
SMTP_SKIP_SPACE(token);
- sprintf(Buffer, "RCPT TO:<%s>\r\n", token);
+ snprintf(Buffer, MAIL_BUFFER_SIZE, "RCPT TO:<%s>\r\n", token);
if ((res = Post(Buffer)) != SUCCESS)
return (res);
if ((res = Ack(&server_response)) != SUCCESS) {
@@ -542,7 +542,7 @@ static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char
while(token != NULL)
{
SMTP_SKIP_SPACE(token);
- sprintf(Buffer, "RCPT TO:<%s>\r\n", token);
+ snprintf(Buffer, MAIL_BUFFER_SIZE, "RCPT TO:<%s>\r\n", token);
if ((res = Post(Buffer)) != SUCCESS) {
return (res);
}