? doc/help2html.pl
Index: include/irc_std.h
===================================================================
RCS file: /home/cvs/ircii/include/irc_std.h,v
retrieving revision 1.61
diff -p -u -u -r1.61 irc_std.h
--- include/irc_std.h 12 Dec 2015 20:44:36 -0000 1.61
+++ include/irc_std.h 30 Oct 2017 21:21:46 -0000
@@ -49,8 +49,6 @@
#define my_strcat(d,s) strcat(CP(d), CP(s))
#define my_strncat(d,s,n) strncat(CP(d), CP(s), (n))
#define my_strmcat(d,s,n) strmcat(UP(d), UP(s), (n))
-#define my_strcpy(d,s) strcpy(CP(d), CP(s))
-#define my_strncpy(d,s,n) strncpy(CP(d), CP(s), (n))
#define my_strmcpy(d,s,n) strmcpy(UP(d), UP(s), (n))
#define my_index(s,c) UP(strchr(CP(s), (c)))
#define my_rindex(s,c) UP(strrchr(CP(s), (c)))
Index: include/ircaux.h
===================================================================
RCS file: /home/cvs/ircii/include/ircaux.h,v
retrieving revision 1.40
diff -p -u -u -r1.40 ircaux.h
--- include/ircaux.h 2 Jul 2017 14:33:19 -0000 1.40
+++ include/ircaux.h 30 Oct 2017 21:21:46 -0000
@@ -65,6 +65,8 @@
int connect_by_number(int, u_char *, int, struct addrinfo **, struct addrinfo **);
int my_stricmp(const u_char *, const u_char *);
int my_strnicmp(const u_char *, const u_char *, size_t);
+ u_char *my_strcpy(u_char *, const u_char *);
+ u_char *my_strncpy(u_char *, const u_char *, size_t);
int set_non_blocking(int);
int set_blocking(int);
int scanstr(u_char *, u_char *);
Index: source/dcc.c
===================================================================
RCS file: /home/cvs/ircii/source/dcc.c,v
retrieving revision 1.183
diff -p -u -u -r1.183 dcc.c
--- source/dcc.c 14 Sep 2017 22:13:23 -0000 1.183
+++ source/dcc.c 30 Oct 2017 21:21:47 -0000
@@ -798,7 +798,7 @@ dcc_raw_connect(u_char *host, u_int ipor
err = getnameinfo((struct sockaddr *) &address, sizeof address, CP(addr), NI_MAXHOST, 0, 0, NI_NUMERICHOST);
if (err != 0)
{
- my_strncpy(addr, "[unknown]", sizeof(addr) - 1);
+ my_strncpy(addr, UP("[unknown]"), sizeof(addr) - 1);
yell("dcc_raw_connect: getnameinfo failed: %s", gai_strerror(err));
}
malloc_strcpy(&Client->remname, addr);
@@ -1191,7 +1191,7 @@ process_incoming_listen(DCC_list *Client
err = getnameinfo((struct sockaddr *) &remaddr, sra, CP(host), NI_MAXHOST, 0, 0, 0);
if (err != 0)
{
- my_strncpy(host, "[unknown]", sizeof(host) - 1);
+ my_strncpy(host, UP("[unknown]"), sizeof(host) - 1);
yell("process_incoming_listen: getnameinfo failed?");
}
Name = host;
Index: source/ircaux.c
===================================================================
RCS file: /home/cvs/ircii/source/ircaux.c,v
retrieving revision 1.124
diff -p -u -u -r1.124 ircaux.c
--- source/ircaux.c 13 Sep 2017 21:24:56 -0000 1.124
+++ source/ircaux.c 30 Oct 2017 21:21:47 -0000
@@ -826,6 +826,34 @@ srindex(u_char *string, u_char *group)
return NULL;
}
+/* my_strcpy(): overlapping safe strcpy() */
+u_char *
+my_strcpy(u_char *dst, const u_char *src)
+{
+ u_char *ret = dst;
+
+ for (; (*dst = *src) != '\0'; ++dst, ++src)
+ /* empty */;
+
+ return ret;
+}
+
+/* my_strncpy(): overlapping safe strncpy() */
+u_char *
+my_strncpy(u_char *dst, const u_char *src, size_t len)
+{
+ u_char *ret = dst;
+
+ for (; len > 0; len--)
+ {
+ *dst++ = *src;
+ if (*src != '\0')
+ src++;
+ }
+
+ return ret;
+}
+
/* is_number: returns true if the given string is a number, false otherwise */
int
is_number(u_char *str)
Index: source/lastlog.c
===================================================================
RCS file: /home/cvs/ircii/source/lastlog.c,v
retrieving revision 1.57
diff -p -u -u -r1.57 lastlog.c
--- source/lastlog.c 14 Sep 2017 22:13:23 -0000 1.57
+++ source/lastlog.c 30 Oct 2017 21:21:47 -0000
@@ -115,9 +115,9 @@ bits_to_lastlog_level(int level)
int first = 1;
if (level == LOG_ALL)
- my_strcpy(lbuf, "ALL");
+ my_strcpy(lbuf, UP("ALL"));
else if (level == 0)
- my_strcpy(lbuf, "NONE");
+ my_strcpy(lbuf, UP("NONE"));
else
{
*lbuf = '\0';
Index: source/notice.c
===================================================================
RCS file: /home/cvs/ircii/source/notice.c,v
retrieving revision 1.79
diff -p -u -u -r1.79 notice.c
--- source/notice.c 14 Sep 2017 22:13:24 -0000 1.79
+++ source/notice.c 30 Oct 2017 21:21:47 -0000
@@ -338,7 +338,7 @@ got_initial_version(u_char *line)
if ((sscanf(CP(line), "*** Your host is %255s running version %255s",
server, version)) != 2) {
yell("This server has a non-standard connection message!");
- my_strcpy(version, "2.9");
+ my_strcpy(version, UP("2.9"));
my_strcpy(server, server_get_name(parsing_server()));
}
else if ((c = server[my_strlen(server) - 1]) == ',' || c == '.')
Index: source/numbers.c
===================================================================
RCS file: /home/cvs/ircii/source/numbers.c,v
retrieving revision 1.100
diff -p -u -u -r1.100 numbers.c
--- source/numbers.c 14 Sep 2017 22:13:24 -0000 1.100
+++ source/numbers.c 30 Oct 2017 21:21:47 -0000
@@ -80,7 +80,7 @@ numeric_banner(void)
if (get_int_var(SHOW_NUMERICS_VAR))
snprintf(CP(thing), sizeof thing, "%3.3u", -current_numeric());
else
- my_strcpy(thing, "***");
+ my_strcpy(thing, UP("***"));
return (thing);
}
Index: source/parse.c
===================================================================
RCS file: /home/cvs/ircii/source/parse.c,v
retrieving revision 1.117
diff -p -u -u -r1.117 parse.c
--- source/parse.c 14 Sep 2017 22:13:24 -0000 1.117
+++ source/parse.c 30 Oct 2017 21:21:47 -0000
@@ -355,7 +355,7 @@ whoreply(u_char *from, u_char **ArgList)
(u_char) last_width,
(u_char) last_width);
else
- my_strcpy(format, "%s\t%-9s %-3s %s@%s (%s)");
+ my_strcpy(format, UP("%s\t%-9s %-3s %s@%s (%s)"));
}
i = 0;
channel = user = host = server = nick = status = name = empty_string();