summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/inspircd_io.cpp2
-rw-r--r--src/modules.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index ed1c8fda8..730e7fea0 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -337,7 +337,7 @@ bool InspIRCd::LoadModule(const char* filename)
{
char modfile[MAXBUF];
#ifdef STATIC_LINK
- snprintf(modfile,MAXBUF,"%s",filename);
+ strlcpy(modfile,filename,MAXBUF);
#else
snprintf(modfile,MAXBUF,"%s/%s",Config->ModPath,filename);
#endif
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index dd5b14692..42ae122e8 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -677,7 +677,7 @@ bool ServerConfig::LoadConf(const char* filename, std::stringstream *target, std
}
snprintf(newconf,10240,"%s/%s",confpath,buf);
}
- else snprintf(newconf,10240,"%s",buf);
+ else strlcpy(newconf,buf,10240);
std::stringstream merge(stringstream::in | stringstream::out);
// recursively call LoadConf and get the new data, use the same errorstream
if (LoadConf(newconf, &merge, errorstream))
diff --git a/src/modules.cpp b/src/modules.cpp
index 87df6bdfc..d76f20f5f 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -454,7 +454,7 @@ void Server::SendTo(userrec* Source, userrec* Dest, std::string s)
void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text)
{
- WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
+ WriteChannelWithServ_NoFormat((char*)ServName.c_str(), Channel, text.c_str());
}
void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender)