From d490528e80606da1250a21986c040ab483abd9a2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 31 Oct 2012 17:53:20 +0000 Subject: memory corruption in tabSRMM git-svn-id: http://svn.miranda-ng.org/main/trunk@2124 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/eventpopups.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 394979f280..1b08037ec5 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -664,7 +664,7 @@ static int PopupUpdateT(HANDLE hContact, HANDLE hEvent) pdata->nrMerged++; if (pdata->nrMerged >= pdata->nrEventsAlloced) { pdata->nrEventsAlloced += 5; - pdata->eventData = (EVENT_DATAT *)realloc(pdata->eventData, pdata->nrEventsAlloced * sizeof(EVENT_DATAT)); + pdata->eventData = (EVENT_DATAT *)mir_realloc(pdata->eventData, pdata->nrEventsAlloced * sizeof(EVENT_DATAT)); } if (dbe.pBlob) free(dbe.pBlob); @@ -721,8 +721,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, HANDLE hContact, HANDLE hEvent if (hEvent == 0 && hContact == 0) dbe.szModule = Translate("Unknown module or contact"); - pdata = (PLUGIN_DATAT *)mir_alloc(sizeof(PLUGIN_DATAT)); - ZeroMemory((void*)pdata, sizeof(PLUGIN_DATAT)); + pdata = (PLUGIN_DATAT *)mir_calloc(sizeof(PLUGIN_DATAT)); pdata->eventType = eventType; pdata->hContact = hContact; -- cgit v1.2.3