Some more fixes.
This commit is contained in:
parent
fa63e0d234
commit
bb7234388f
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-jcc_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
|
||||
$OpenBSD: patch-jcc_c,v 1.3 2001/06/09 04:02:20 angelos Exp $
|
||||
--- jcc.c.orig Fri Oct 30 22:58:47 1998
|
||||
+++ jcc.c Fri Jun 8 22:24:37 2001
|
||||
@@ -226,7 +226,7 @@ chat(struct client_state *csp)
|
||||
@ -30,7 +30,7 @@ $OpenBSD: patch-jcc_c,v 1.2 2001/06/09 02:36:48 angelos Exp $
|
||||
+ fprintf(stderr, "%s:%d zalloc failed\n", __FILE__, __LINE__);
|
||||
+ exit(-1);
|
||||
+ }
|
||||
+ snprintf(err, (strlen(CFAIL) + strlen(http->hostport)), CFAIL, http->hostport, eno);
|
||||
+ snprintf(err, (strlen(CFAIL) + strlen(http->hostport) + strlen(eno)), CFAIL, http->hostport, eno);
|
||||
}
|
||||
|
||||
write_socket(csp->cfd, err, strlen(err));
|
||||
|
@ -1,12 +1,28 @@
|
||||
$OpenBSD: patch-parsers_c,v 1.3 2001/06/09 03:13:18 angelos Exp $
|
||||
$OpenBSD: patch-parsers_c,v 1.4 2001/06/09 04:02:22 angelos Exp $
|
||||
--- parsers.c.orig Fri Oct 30 22:58:47 1998
|
||||
+++ parsers.c Fri Jun 8 22:17:08 2001
|
||||
@@ -244,7 +244,7 @@ list_to_text(struct list *h)
|
||||
+++ parsers.c Fri Jun 8 23:58:26 2001
|
||||
@@ -224,7 +224,7 @@ list_to_text(struct list *h)
|
||||
struct list *p;
|
||||
char *ret = NULL;
|
||||
char *s;
|
||||
- int size;
|
||||
+ int size, l;
|
||||
|
||||
size = 0;
|
||||
|
||||
@@ -241,12 +241,13 @@ list_to_text(struct list *h)
|
||||
ret[size] = '\0';
|
||||
|
||||
s = ret;
|
||||
-
|
||||
+ l = 0;
|
||||
for(p = h->next; p ; p = p->next) {
|
||||
if(p->str) {
|
||||
- strcpy(s, p->str);
|
||||
+ strlcpy(s, p->str, size - 1 - strlen(s));
|
||||
+ l += strlcpy(s, p->str, size - l);
|
||||
s += strlen(s);
|
||||
*s++ = '\r'; *s++ = '\n';
|
||||
+ l += 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user