summaryrefslogtreecommitdiff
path: root/plugins/Variables/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-03 17:14:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-03 17:14:17 +0000
commit4c7043a8e251ca5bdf32b2cba7ece8c392c5a1fe (patch)
treebebbc657b6edc890fcd678c14e9c32120aece89f /plugins/Variables/src
parente796065fc79da14e8845527e3af00eccb5263b13 (diff)
memory allocation problem in Variables
git-svn-id: http://svn.miranda-ng.org/main/trunk@8382 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Variables/src')
-rw-r--r--plugins/Variables/src/parse_metacontacts.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp
index dd4f247020..564e04749f 100644
--- a/plugins/Variables/src/parse_metacontacts.cpp
+++ b/plugins/Variables/src/parse_metacontacts.cpp
@@ -51,9 +51,10 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai)
if (szUniqueID == NULL) {
szProto = PROTOID_HANDLE;
- szUniqueID = (TCHAR *)mir_alloc(32);
- mir_sntprintf(szUniqueID, 32, _T("%p"), hContact);
- if (szProto == NULL || szUniqueID == NULL)
+ TCHAR tszID[40];
+ mir_sntprintf(tszID, SIZEOF(tszID), _T("%p"), hContact);
+ szUniqueID = mir_tstrdup(tszID);
+ if (szUniqueID == NULL)
return NULL;
}