summaryrefslogtreecommitdiffstats
path: root/include/security.c
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-01-08 20:58:33 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-01-08 20:58:33 +0000
commit506bfed29a2a94e099faac8f3d75b72bfe4edd45 (patch)
tree79716f045721a3efd3ebf9025404583126a948b4 /include/security.c
parentec24086762601498657a4675c55c4a899a501617 (diff)
- replace strncpy() with secure strscpy() where possible (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1148 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'include/security.c')
-rw-r--r--include/security.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/security.c b/include/security.c
index eaf7b68e..0a0be6d8 100644
--- a/include/security.c
+++ b/include/security.c
@@ -37,7 +37,7 @@ int check_security(int sockfd, char *ip_list, int allow_if_empty)
int i;
char *s;
- char tmp[MAX_STRING_LEN+1];
+ char tmp[MAX_STRING_LEN];
zabbix_log( LOG_LEVEL_DEBUG, "In check_security()");
@@ -57,7 +57,7 @@ int check_security(int sockfd, char *ip_list, int allow_if_empty)
zabbix_log( LOG_LEVEL_DEBUG, "Connection from [%s]. Allowed servers [%s] ",sname, ip_list);
- strncpy(tmp,ip_list,MAX_STRING_LEN);
+ strscpy(tmp,ip_list);
s=(char *)strtok(tmp,",");
while(s!=NULL)
{