mirror of
https://github.com/anope/anope.git
synced 2026-07-07 05:13:12 +02:00
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
This commit is contained in:
@@ -826,9 +826,9 @@ void req_send_memos(User *u, char *vIdent, char *vHost)
|
||||
return;
|
||||
|
||||
if (vIdent)
|
||||
sprintf(host, "%s@%s", vIdent, vHost);
|
||||
snprintf(host, sizeof(host), "%s@%s", vIdent, vHost);
|
||||
else
|
||||
sprintf(host, "%s", vHost);
|
||||
snprintf(host, sizeof(host), "%s", vHost);
|
||||
|
||||
if (HSRequestMemoOper == 1)
|
||||
{
|
||||
|
||||
@@ -478,12 +478,12 @@ void fill_db_ptr(DBFile *dbptr, int version, int core_version,
|
||||
dbptr->db_version = version;
|
||||
dbptr->core_db_version = core_version;
|
||||
if (!service)
|
||||
strcpy(dbptr->service, service);
|
||||
strlcpy(dbptr->service, service, sizeof(dbptr->service));
|
||||
else
|
||||
strcpy(dbptr->service, "");
|
||||
strlcpy(dbptr->service, "", sizeof(dbptr->service));
|
||||
|
||||
strcpy(dbptr->filename, filename);
|
||||
snprintf(dbptr->temp_name, 261, "%s.temp", filename);
|
||||
strlcpy(dbptr->filename, filename, sizeof(dbptr->filename));
|
||||
snprintf(dbptr->temp_name, sizeof(dbptr->temp_name), "%s.temp", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user