summaryrefslogtreecommitdiff
path: root/src/protocol/unreal32.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-20 04:34:03 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-10-20 04:34:03 +0000
commit0b3824c86a99354d06339b95e40515de762d65f7 (patch)
tree133edb1fb478a97674cb63e1f89a4762053d24e2 /src/protocol/unreal32.c
parent0d3ec454de486da5cbc292f7e694ee8ab7e4fae0 (diff)
Apply some changes based on possible "flaws" found with flawfinder.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2574 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/unreal32.c')
-rw-r--r--src/protocol/unreal32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 34efa0f00..5c50dc8cd 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -822,7 +822,7 @@ int anope_event_sethost(const char *source, int ac, const char **av)
/* If a user has a custom host and a server splits and reconnects
* Unreal does not send the users cloaked host to Anope.. so we do not know it.
- * However, they will be +t if this is the case, so we will set their vhost
+ * However, they will be +t if this is the case, so we will set their vhost
* to the sethost value (which really is their vhost) and clear the chost.
* The chost will be request later (if needed) - Adam
*/
@@ -1024,7 +1024,7 @@ int anope_event_userhost(const char *source, int ac, const char **av)
*/
if (ac < 2 || !av[1] || !*av[1])
return MOD_CONT;
-
+
std::string reply = av[1];
std::string user = std::string(reply.begin(), std::find(reply.begin(), reply.end(), '='));
if (user[user.length() - 1] == '*')
@@ -1130,7 +1130,7 @@ bool ChannelModeFlood::IsValid(const char *value)
if (*value != ':' && strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0 && *dp == ':' && *(++dp) && strtoul(dp, &end, 10) > 0 && !*end) return 1;
else {
/* '['<number><1 letter>[optional: '#'+1 letter],[next..]']'':'<number> */
- strncpy(xbuf, value, sizeof(xbuf));
+ strlcpy(xbuf, value, sizeof(xbuf));
p2 = strchr(xbuf + 1, ']');
if (!p2) return 0;
*p2 = '\0';