diff options
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 55f4cdf575..98c6e34c68 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -642,7 +642,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) if (p == NULL) {
p = (logthread_info*)mir_calloc(sizeof(logthread_info));
p->hContact = hContact;
- strncpy(p->sProtoName, cws->szModule, MAXMODULELABELLENGTH);
+ mir_strncpy(p->sProtoName, cws->szModule, SIZEOF(p->sProtoName));
arContacts.insert(p);
mir_forkthread(waitThread, p);
}
@@ -675,7 +675,7 @@ static void cleanThread(void *param) mir_snprintf(str, "OffTime-%s", infoParam->sProtoName);
db_unset(NULL, S_MOD, str);
}
- free(infoParam);
+ mir_free(infoParam);
}
int ModeChange(WPARAM wparam, LPARAM lparam)
@@ -696,8 +696,8 @@ int ModeChange(WPARAM wparam, LPARAM lparam) //we have just loged-in
db_set_dw(NULL, "UserOnline", ack->szModule, GetTickCount());
if (!Miranda_Terminated() && IsWatchedProtocol(ack->szModule)) {
- logthread_info *info = (logthread_info *)malloc(sizeof(logthread_info));
- strncpy(info->sProtoName, courProtoName, MAXMODULELABELLENGTH);
+ logthread_info *info = (logthread_info *)mir_alloc(sizeof(logthread_info));
+ mir_strncpy(info->sProtoName, courProtoName, SIZEOF(info->sProtoName));
info->hContact = 0;
info->currStatus = 0;
|