diff options
author | Tilman Keskinoz <arved@FreeBSD.org> | 2004-03-28 14:35:13 +0000 |
---|---|---|
committer | Tilman Keskinoz <arved@FreeBSD.org> | 2004-03-28 14:35:13 +0000 |
commit | 806a70821f7981144bbaba4c3677d15e01e5db53 (patch) | |
tree | 2ade8bafb50b23f5c3e276007e44789c2ec84b68 /irc/bitchx/files | |
parent | - Update to version 0.1.1 (diff) |
Update to 1.1
portlint
Diffstat (limited to 'irc/bitchx/files')
-rw-r--r-- | irc/bitchx/files/patch-caf-evilserver | 272 | ||||
-rw-r--r-- | irc/bitchx/files/patch-dcc-force-port | 35 | ||||
-rw-r--r-- | irc/bitchx/files/patch-names.c | 18 | ||||
-rw-r--r-- | irc/bitchx/files/patch-status.c | 11 |
4 files changed, 0 insertions, 336 deletions
diff --git a/irc/bitchx/files/patch-caf-evilserver b/irc/bitchx/files/patch-caf-evilserver deleted file mode 100644 index 55cf1481c67d..000000000000 --- a/irc/bitchx/files/patch-caf-evilserver +++ /dev/null @@ -1,272 +0,0 @@ -diff -ur BitchX.orig/source/banlist.c BitchX/source/banlist.c ---- BitchX.orig/source/banlist.c Thu Feb 28 15:22:46 2002 -+++ source/banlist.c Wed Mar 26 01:47:23 2003 -@@ -264,9 +264,9 @@ - char * ban_it(char *nick, char *user, char *host, char *ip) - { - static char banstr[BIG_BUFFER_SIZE/4+1]; --char *tmpstr = NULL; - char *t = user; - char *t1 = user; -+char *tmp; - - *banstr = 0; - while (strlen(t1)>9) -@@ -277,32 +277,40 @@ - case 7: - if (ip) - { -- sprintf(banstr, "*!*@%s", cluster(ip)); -+ snprintf(banstr, sizeof banstr, "*!*@%s", -+ cluster(ip)); - break; - } - case 2: /* Better */ -- sprintf(banstr, "*!*%s@%s", t1, cluster(host)); -+ snprintf(banstr, sizeof banstr, "*!*%s@%s", t1, -+ cluster(host)); - break; - case 3: /* Host */ -- sprintf(banstr, "*!*@%s", host); -+ snprintf(banstr, sizeof banstr, "*!*@%s", host); - break; - case 4: /* Domain */ -- sprintf(banstr, "*!*@*%s", strrchr(host, '.')); -- break; -+ tmp = strrchr(host, '.'); -+ if (tmp) { -+ snprintf(banstr, sizeof banstr, "*!*@*%s", -+ tmp); -+ } else { -+ snprintf(banstr, sizeof banstr, "*!*@%s", -+ host); -+ } -+ break; - case 5: /* User */ -- sprintf(banstr, "*!%s@%s", t, cluster(host)); -+ snprintf(banstr, sizeof banstr, "*!%s@%s", t, -+ cluster(host)); - break; - case 6: /* Screw */ -- malloc_sprintf(&tmpstr, "*!*%s@%s", t1, host); -- strcpy(banstr, screw(tmpstr)); -- new_free(&tmpstr); -+ snprintf(banstr, sizeof banstr, "*!*%s@%s", t1, host); -+ screw(banstr); - break; - case 1: /* Normal */ - default: -- { -- sprintf(banstr, "%s!*%s@%s", nick, t1, host); -+ snprintf(banstr, sizeof banstr, "%s!*%s@%s", nick, t1, -+ host); - break; -- } - } - return banstr; - } -Only in BitchX/source: banlist.c.orig -diff -ur BitchX.orig/source/ctcp.c BitchX/source/ctcp.c ---- BitchX.orig/source/ctcp.c Thu Feb 28 15:22:47 2002 -+++ source/ctcp.c Wed Mar 26 01:49:52 2003 -@@ -1482,6 +1482,10 @@ - *putbuf2; - int len; - len = IRCD_BUFFER_SIZE - (12 + strlen(to)); -+ -+ if (len < strlen(ctcp_cmd[datatag].name) + 3) -+ return; -+ - putbuf2 = alloca(len); - - if (format) -diff -ur BitchX.orig/source/misc.c BitchX/source/misc.c ---- BitchX.orig/source/misc.c Sun Mar 24 20:31:07 2002 -+++ source/misc.c Wed Mar 26 01:57:44 2003 -@@ -3110,42 +3110,47 @@ - static char result[IRCD_BUFFER_SIZE/4 + 1]; - char temphost[BIG_BUFFER_SIZE + 1]; - char *host; -+ char *atsign; - - if (!hostname) - return NULL; -- host = temphost; -- *result = 0; -- memset(result, 0, sizeof(result)); -- memset(temphost, 0, sizeof(temphost)); -- if (strchr(hostname, '@')) -- { -- if (*hostname == '~') -- hostname++; -- strcpy(result, hostname); -- *strchr(result, '@') = '\0'; -- if (strlen(result) > 9) -- { -- result[8] = '*'; -- result[9] = '\0'; -+ -+ atsign = strchr(hostname, '@'); -+ if (atsign) { -+ if (*hostname == '~') { -+ strcpy(result, "~*@"); -+ } else { -+ size_t ident_len = atsign - hostname; -+ -+ if (ident_len <= 9) { -+ /* copy ident@ */ -+ strmcpy(result, hostname, ident_len + 1); -+ } else { -+ strmcpy(result, hostname, 8); -+ result[8] = '*'; -+ result[9] = '@'; -+ result[10] = '\0'; -+ } - } -- strcat(result, "@"); -- if (!(hostname = strchr(hostname, '@'))) -- return NULL; -- hostname++; -+ hostname = atsign + 1; -+ } else { -+ *result = 0; - } -- strcpy(host, hostname); - -- if (*host && isdigit(*(host + strlen(host) - 1))) -+ strlcpy(temphost, hostname, sizeof temphost); -+ host = temphost; -+ -+ if (*host && isdigit((unsigned char)*(host + strlen(host) - 1))) - { - /* Thanks icebreak for this small patch which fixes this function */ - int i; - char *tmp; -- char count=0; -+ char count = 0; - - tmp = host; -- while((tmp-host)<strlen(host)) -+ while((tmp - host) < strlen(host)) - { -- if((tmp=strchr(tmp,'.'))==NULL) -+ if((tmp = strchr(tmp,'.')) == NULL) - break; - count++; - tmp++; -@@ -3154,8 +3159,8 @@ - for (i = 0; i < count; i++) - tmp = strchr(tmp, '.') + 1; - *tmp = '\0'; -- strcat(result, host); -- strcat(result, "*"); -+ strlcat(result, host, sizeof result); -+ strlcat(result, "*", sizeof result); - } - else - { -@@ -3177,16 +3182,17 @@ - else - return (char *) NULL; - } -+ -+ /* We don't need strlcat for these first two, because -+ * at this point the maximum length of the string in -+ * result is 10 */ - strcat(result, "*"); - if (my_stricmp(host, temphost)) - strcat(result, "."); -- strcat(result, host); -+ strlcat(result, host, sizeof result); - } - return result; - } -- -- -- - - struct _sock_manager - { -Only in BitchX/source: misc.c.orig -Only in BitchX/source: misc.c.rej -diff -ur BitchX.orig/source/names.c BitchX/source/names.c ---- BitchX.orig/source/names.c Tue Mar 26 07:47:30 2002 -+++ source/names.c Wed Mar 26 01:58:54 2003 -@@ -572,7 +572,7 @@ - - *nmodes = 0; - *nargs = 0; -- for (; *modes; modes++) -+ for (; *modes && (strlen(nmodes) + 2) < sizeof nmodes; modes++) - { - isbanned = isopped = isvoiced = 0; - switch (*modes) -@@ -742,7 +742,7 @@ - - /* modes which can be done multiple times are added here */ - -- for (tucm = ucm; tucm; tucm = tucm->next) -+ for (tucm = ucm; tucm && (strlen(nmodes) + 2) < sizeof nmodes; tucm = tucm->next) - { - if (tucm->o_ed) - { -diff -ur BitchX.orig/source/notice.c BitchX/source/notice.c ---- BitchX.orig/source/notice.c Thu Feb 28 15:22:50 2002 -+++ source/notice.c Wed Mar 26 01:59:44 2003 -@@ -425,7 +425,7 @@ - int conn = !strncmp(line+7, "connect", 7) ? 1 : 0; - int dalnet = 0, ircnet = 0; - -- if (*(line+18) == ':') -+ if (strlen(line) >= 19 && line[18] == ':') - q = NULL; - else - dalnet = (q == NULL); -diff -ur BitchX.orig/source/numbers.c BitchX/source/numbers.c ---- BitchX.orig/source/numbers.c Thu Feb 28 15:22:50 2002 -+++ source/numbers.c Wed Mar 26 02:02:35 2003 -@@ -354,26 +354,29 @@ - - set_display_target(chan, LOG_CURRENT); - PasteArgs(ArgList, 0); -- strcpy(buffer, ArgList[0]); -+ strlcpy(buffer, ArgList[0], sizeof buffer); - switch(-current_numeric) - { - case 437: -- strcat(buffer, " (Channel is temporarily unavailable)"); -+ strlcat(buffer, -+ " (Channel is temporarily unavailable)", -+ sizeof buffer); - break; - case 471: -- strcat(buffer, " (Channel is full)"); -+ strlcat(buffer, " (Channel is full)", sizeof buffer); - break; - case 473: -- strcat(buffer, " (You must be invited)"); -+ strlcat(buffer, " (You must be invited)", -+ sizeof buffer); - break; - case 474: -- strcat(buffer, " (You are banned)"); -+ strlcat(buffer, " (You are banned)", sizeof buffer); - break; - case 475: -- strcat(buffer, " (Bad channel key)"); -+ strlcat(buffer, " (Bad channel key)", sizeof buffer); - break; - case 476: -- strcat(buffer, " (Bad channel mask)"); -+ strlcat(buffer, " (Bad channel mask)", sizeof buffer); - break; - default: - return; -@@ -384,7 +387,6 @@ - put_it("%s %s", numeric_banner(), buffer); - reset_display_target(); - } -- - - int handle_server_stats(char *from, char **ArgList, int comm) - { diff --git a/irc/bitchx/files/patch-dcc-force-port b/irc/bitchx/files/patch-dcc-force-port deleted file mode 100644 index 030a5684685a..000000000000 --- a/irc/bitchx/files/patch-dcc-force-port +++ /dev/null @@ -1,35 +0,0 @@ ---- include/vars.h.old Sun Nov 4 17:18:23 2001 -+++ include/vars.h Sun Nov 4 17:20:30 2001 -@@ -89,6 +89,7 @@ - DCC_BLOCK_SIZE_VAR, - DCC_DLDIR_VAR , - DCC_FAST_VAR, -+ DCC_FORCE_PORT_VAR, - DCC_GET_LIMIT_VAR, - DCC_MAX_AUTOGET_SIZE_VAR , - DCC_QUEUE_LIMIT_VAR, - ---- source/vars.c.old Sun Nov 4 17:16:10 2001 -+++ source/vars.c Sun Nov 4 17:15:55 2001 -@@ -189,6 +189,7 @@ - { "DCC_BLOCK_SIZE",0, INT_TYPE_VAR, DEFAULT_DCC_BLOCK_SIZE, NULL, NULL, 0, VIF_BITCHX }, - { "DCC_DLDIR",0, STR_TYPE_VAR, 0, NULL, NULL, 0, VIF_BITCHX }, - { "DCC_FAST",0, BOOL_TYPE_VAR, DEFAULT_DCC_FAST, NULL, NULL, 0, VIF_BITCHX }, -+ { "DCC_FORCE_PORT",0, INT_TYPE_VAR, 0, NULL, NULL, 0, VIF_BITCHX }, - { "DCC_GET_LIMIT",0, INT_TYPE_VAR, DEFAULT_DCC_GET_LIMIT, NULL, NULL, 0, VIF_BITCHX }, - { "DCC_MAX_AUTOGET_SIZE",0, INT_TYPE_VAR, DEFAULT_MAX_AUTOGET_SIZE, NULL, NULL, 0, VIF_BITCHX }, - { "DCC_QUEUE_LIMIT",0, INT_TYPE_VAR, DEFAULT_DCC_QUEUE_LIMIT, NULL, NULL, 0, VIF_BITCHX }, - ---- source/dcc.c.old Sun Nov 4 17:16:25 2001 -+++ source/dcc.c Sun Nov 4 17:18:00 2001 -@@ -620,7 +620,9 @@ - - if (get_int_var(RANDOM_LOCAL_PORTS_VAR)) - portnum = random_number(65535 - 1024) + 1024; -- -+ if (get_int_var(DCC_FORCE_PORT_VAR)) -+ portnum = get_int_var(DCC_FORCE_PORT_VAR); -+ - #ifdef DCC_CNCT_PEND - flags |= DCC_CNCT_PEND; - #endif diff --git a/irc/bitchx/files/patch-names.c b/irc/bitchx/files/patch-names.c deleted file mode 100644 index 00171c2cde8b..000000000000 --- a/irc/bitchx/files/patch-names.c +++ /dev/null @@ -1,18 +0,0 @@ -Index: source/names.c -=================================================================== -RCS file: /cvs/bitchx/BitchX/source/names.c,v -retrieving revision 1.8 -diff -u -3 -p -r1.8 names.c ---- source/names.c 25 Mar 2003 04:32:14 -0000 1.8 -+++ source/names.c 8 May 2003 20:26:11 -0000 -@@ -1004,8 +1004,9 @@ static int decifer_mode(char *from, char - malloc_strcpy(key, next_arg(rest, &rest)); - else - { -- if (rest && *key && !my_strnicmp(rest, *key, strlen(*key))) -+ if (rest && *key && (!my_strnicmp(rest, *key, strlen(*key)) || rest[0] == '*')) - next_arg(rest, &rest); -+ - new_free(key); - } - (*channel)->i_mode = -1; diff --git a/irc/bitchx/files/patch-status.c b/irc/bitchx/files/patch-status.c deleted file mode 100644 index 5f79467876b7..000000000000 --- a/irc/bitchx/files/patch-status.c +++ /dev/null @@ -1,11 +0,0 @@ ---- source/status.c.orig Fri Jul 18 04:58:48 2003 -+++ source/status.c Fri Jul 18 05:02:50 2003 -@@ -1213,7 +1213,7 @@ - * current-type window, although i think they should go to all windows. - */ - #define STATUS_VAR(x) \ --static char *status_user ## x ## (Window *window) \ -+static char *status_user ## x (Window *window) \ - { \ - char *text; \ - \ |