]>
Commit | Line | Data |
---|---|---|
6039cdc1 | 1 | diff -urN BitchX/source/misc.c BitchX-patched/source/misc.c |
2 | --- BitchX/source/misc.c 2003-06-11 07:00:42.000000000 +0000 | |
3 | +++ BitchX-patched/source/misc.c 2004-06-13 21:16:32.000000000 +0000 | |
4 | @@ -3114,7 +3114,7 @@ | |
5 | atsign = strchr(hostname, '@'); | |
6 | if (atsign) { | |
7 | if (*hostname == '~') { | |
8 | - strcpy(result, "~*@"); | |
9 | + strmcpy(result, "~*@", sizeof(result)-1); | |
10 | } else { | |
11 | size_t ident_len = atsign - hostname; | |
12 | ||
13 | @@ -3184,7 +3184,7 @@ | |
14 | * result is 11 */ | |
15 | strcat(result, "*"); | |
bf904ecd | 16 | if (my_stricmp(host, temphost)) |
17 | - strcat(result, "."); | |
bf904ecd | 18 | + strmcat(result, ".", sizeof(result)-1); |
6039cdc1 | 19 | strlcat(result, host, sizeof result); |
bf904ecd | 20 | } |
21 | return result; | |
6039cdc1 | 22 | diff -urN BitchX/source/notice.c BitchX-patched/source/notice.c |
23 | --- BitchX/source/notice.c 2003-04-11 01:09:07.000000000 +0000 | |
24 | +++ BitchX-patched/source/notice.c 2004-06-13 21:11:16.000000000 +0000 | |
25 | @@ -422,7 +422,7 @@ | |
bf904ecd | 26 | { |
27 | char *q = strchr(line, ':'); | |
28 | char *port = empty_string; | |
29 | - int conn = !strncmp(line+7, "connect", 7) ? 1 : 0; | |
30 | + int conn = strlen(line) > 7 && !strncmp(line+7, "connect", 7) ? 1 : 0; | |
31 | int dalnet = 0, ircnet = 0; | |
32 | ||
6039cdc1 | 33 | if (strlen(line) >= 19 && line[18] == ':') |
bf904ecd | 34 | @@ -462,7 +462,7 @@ |
35 | else sscanf(p, "%s was %s from %s", for_, fr, temp); | |
36 | ||
37 | q = p; | |
38 | - sprintf(q, "%s@%s", fr, temp); | |
39 | + snprintf(q, strlen(q)+1, "%s@%s", fr, temp); | |
40 | if (!conn) | |
41 | { | |
42 | port = strstr(temp2, "reason:"); | |
6039cdc1 | 43 | diff -urN BitchX/source/server.c BitchX-patched/source/server.c |
44 | --- BitchX/source/server.c 2003-06-11 07:00:43.000000000 +0000 | |
45 | +++ BitchX-patched/source/server.c 2004-06-13 21:02:39.000000000 +0000 | |
46 | @@ -513,11 +513,11 @@ | |
bf904ecd | 47 | } |
48 | else | |
49 | #endif | |
50 | - junk = dgets(bufptr, des, 1, BIG_BUFFER_SIZE, server_list[i].ssl_fd); | |
51 | + junk = dgets(bufptr, des, 1, BIG_BUFFER_SIZE/2, server_list[i].ssl_fd); | |
52 | } | |
53 | else | |
54 | #endif | |
55 | - junk = dgets(bufptr, des, 1, BIG_BUFFER_SIZE, NULL); | |
56 | + junk = dgets(bufptr, des, 1, BIG_BUFFER_SIZE/2, NULL); | |
57 | } | |
58 | switch (junk) | |
59 | { | |
6039cdc1 | 60 | @@ -1777,7 +1777,7 @@ |
bf904ecd | 61 | default: |
62 | if (FD_ISSET(des, &rd)) | |
63 | { | |
64 | - if (!dgets(buffer, des, 0, BIG_BUFFER_SIZE, NULL)) | |
65 | + if (!dgets(buffer, des, 0, BIG_BUFFER_SIZE/2, NULL)) | |
66 | flushing = 0; | |
67 | } | |
68 | break; | |
6039cdc1 | 69 | @@ -1787,7 +1787,7 @@ |
bf904ecd | 70 | FD_ZERO(&rd); |
71 | FD_SET(des, &rd); | |
72 | if (new_select(&rd, NULL, &timeout) > 0) | |
73 | - dgets(buffer, des, 1, BIG_BUFFER_SIZE, NULL); | |
74 | + dgets(buffer, des, 1, BIG_BUFFER_SIZE/2, NULL); | |
75 | } | |
6039cdc1 | 76 | |
77 |