From 2e5f5f0cca1b5d249a05971f0f7e7e0de11da251 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 16 Jun 2015 10:31:24 +0000 Subject: small fix git-svn-id: http://svn.miranda-ng.org/main/trunk@14191 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SeenPlugin/src/utils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/SeenPlugin') 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; -- cgit v1.2.3