8779cd4b60
o fix dspamc that was busted in the 3.8.0 release, verified to work via testing
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
$OpenBSD: patch-src_client_c,v 1.4 2007/12/21 14:42:23 todd Exp $
|
|
--- src/client.c.orig Thu May 25 17:36:39 2006
|
|
+++ src/client.c Sun Apr 29 17:57:52 2007
|
|
@@ -108,7 +108,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
|
|
|
|
/* RCPT TO - Send recipient information */
|
|
|
|
- strcpy(buf, "RCPT TO: ");
|
|
+ strlcpy(buf, "RCPT TO: ", sizeof (buf));
|
|
node_nt = c_nt_first(ATX->users, &c_nt);
|
|
while(node_nt != NULL) {
|
|
const char *ptr = (const char *) node_nt->ptr;
|
|
@@ -170,7 +170,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
|
|
if (ATX->flags & DAF_SUMMARY)
|
|
head = 1;
|
|
|
|
- line = client_getline(&TTX, 300);
|
|
+ line = client_getline(&TTX, 900);
|
|
|
|
while(line != NULL && strcmp(line, ".")) {
|
|
chomp(line);
|
|
@@ -192,7 +192,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
|
|
break;
|
|
}
|
|
free(line);
|
|
- line = client_getline(&TTX, 300);
|
|
+ line = client_getline(&TTX, 900);
|
|
if (line) chomp(line);
|
|
}
|
|
free(line);
|
|
@@ -200,7 +200,7 @@ int client_process(AGENT_CTX *ATX, buffer *message) {
|
|
goto BAIL;
|
|
} else {
|
|
for(i=0;i<ATX->users->items;i++) {
|
|
- char *input = client_getline(&TTX, 300);
|
|
+ char *input = client_getline(&TTX, 900);
|
|
char *x;
|
|
int code = 500;
|
|
|
|
@@ -313,7 +313,7 @@ int client_connect(AGENT_CTX *ATX, int flags) {
|
|
if (domain) {
|
|
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
|
|
saun.sun_family = AF_UNIX;
|
|
- strcpy(saun.sun_path, host);
|
|
+ strlcpy(saun.sun_path, host, sizeof (saun.sun_path));
|
|
addr_len = sizeof(saun.sun_family) + strlen(saun.sun_path) + 1;
|
|
|
|
LOGDEBUG(INFO_CLIENT_CONNECTING, host, 0);
|
|
@@ -443,7 +443,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
|
|
char *inp, *dup, *ptr, *ptrptr;
|
|
int recv_code;
|
|
|
|
- inp = client_getline(TTX, 300);
|
|
+ inp = client_getline(TTX, 900);
|
|
while(inp != NULL) {
|
|
recv_code = 0;
|
|
dup = strdup(inp);
|
|
@@ -467,7 +467,7 @@ char * client_expect(THREAD_CTX *TTX, int code, char *
|
|
|
|
strlcpy(err, inp, len);
|
|
free(inp);
|
|
- inp = client_getline(TTX, 300);
|
|
+ inp = client_getline(TTX, 900);
|
|
}
|
|
|
|
return NULL;
|
|
@@ -512,13 +512,13 @@ int client_getcode(THREAD_CTX *TTX, char *err, size_t
|
|
char *inp, *ptr, *ptrptr;
|
|
int i;
|
|
|
|
- inp = client_getline(TTX, 300);
|
|
+ inp = client_getline(TTX, 900);
|
|
if (!inp)
|
|
return EFAILURE;
|
|
|
|
while(inp && !strncmp(inp, "250-", 4)) {
|
|
free(inp);
|
|
- inp = client_getline(TTX, 300);
|
|
+ inp = client_getline(TTX, 900);
|
|
}
|
|
|
|
strlcpy(err, inp, len);
|