projects
/
ircu2.10.12-pk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5dd977c
)
s_auth.c: Fix off-by-one errors in last commit.
author
Michael Poole
<mdpoole@troilus.org>
Tue, 3 Mar 2015 02:41:12 +0000
(21:41 -0500)
committer
Michael Poole
<mdpoole@troilus.org>
Tue, 3 Mar 2015 02:41:12 +0000
(21:41 -0500)
ircd/s_auth.c
patch
|
blob
|
history
diff --git
a/ircd/s_auth.c
b/ircd/s_auth.c
index 476cce5610e347af399065c528807671c52fe51b..b3e993af3137b147814043082d07d2626e9daec6 100644
(file)
--- a/
ircd/s_auth.c
+++ b/
ircd/s_auth.c
@@
-270,12
+270,13
@@
static int auth_set_username(struct AuthRequest *auth)
{
/* Prepend ~ to user->username. */
s = user->username;
- s[USERLEN
-1
] = '\0';
+ s[USERLEN] = '\0';
for (last = '~'; (ch = *s) != '\0'; )
{
*s++ = last;
last = ch;
}
+ *s++ = last;
*s = '\0';
} /* else cleaned version of client-provided name is in place */