summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src/crypt_lists.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SecureIM/src/crypt_lists.cpp')
-rw-r--r--plugins/SecureIM/src/crypt_lists.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp
index 64de3c3fc1..e15f612b35 100644
--- a/plugins/SecureIM/src/crypt_lists.cpp
+++ b/plugins/SecureIM/src/crypt_lists.cpp
@@ -30,7 +30,7 @@ void loadSupportedProtocols()
SupPro *p = (SupPro*)mir_calloc(sizeof(SupPro));
p->name = mir_strdup(protos[i]->szModuleName);
if (szNames && p->name) {
- char tmp[128]; strcpy(tmp, p->name); strcat(tmp, ":");
+ char tmp[128]; strncpy(tmp, p->name, sizeof(tmp)-1); strncat(tmp, ":", sizeof(tmp)-1);
LPSTR szName = strstr(szNames, tmp);
if (szName) {
szName = strchr(szName, ':');
@@ -40,8 +40,10 @@ void loadSupportedProtocols()
if (szName) {
p->split_on = atoi(++szName); p->tsplit_on = p->split_on;
szName = strchr(szName, ':');
- if (szName)
- p->split_off = atoi(++szName); p->tsplit_off = p->split_off;
+ if (szName) {
+ p->split_off = atoi(++szName);
+ p->tsplit_off = p->split_off;
+ }
}
}
}