summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-09-11 20:10:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-09-11 20:10:05 +0000
commite7f0a0fb7edf96abbddf72eadb490b5eb22447ec (patch)
tree67c9bfeadf64d1622e8ed060a55969ddb6452834 /src/users.cpp
parentea36f2bb1b8b1bf03b8615672866f93697caff75 (diff)
Security audit based on RATS output
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@855 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 2b02e70fb..b940bd6af 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -52,14 +52,14 @@ userrec::userrec()
char* userrec::GetFullHost()
{
- sprintf(result,"%s!%s@%s",nick,ident,dhost);
+ snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
return result;
}
char* userrec::GetFullRealHost()
{
- sprintf(result,"%s!%s@%s",nick,ident,host);
+ snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host);
return result;
}
@@ -80,7 +80,7 @@ bool userrec::IsInvited(char* channel)
void userrec::InviteTo(char* channel)
{
Invited i;
- strcpy(i.channel,channel);
+ strlcpy(i.channel,channel,CHANMAX);
invites.push_back(i);
}