mirror of
https://github.com/anope/anope.git
synced 2026-06-25 05:36:37 +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:
@@ -45,15 +45,11 @@ static int moduleCopyFile(const char *name, const char *output)
|
||||
int srcfp;
|
||||
#endif
|
||||
char input[4096];
|
||||
int len;
|
||||
|
||||
strncpy(input, services_dir.c_str(), 4095);
|
||||
len = strlen(input);
|
||||
strncat(input, "/modules/", 4095 - len); /* Get full path with module extension */
|
||||
len = strlen(input);
|
||||
strncat(input, name, 4095 - len);
|
||||
len = strlen(output);
|
||||
strncat(input, MODULE_EXT, 4095 - len);
|
||||
strlcpy(input, services_dir.c_str(), sizeof(input));
|
||||
strlcat(input, "/modules/", sizeof(input)); /* Get full path with module extension */
|
||||
strlcat(input, name, sizeof(input));
|
||||
strlcat(input, MODULE_EXT, sizeof(input));
|
||||
|
||||
#ifndef _WIN32
|
||||
if ((srcfp = mkstemp(const_cast<char *>(output))) == -1)
|
||||
|
||||
Reference in New Issue
Block a user