summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/options.cpp
diff options
context:
space:
mode:
authorAlexander Gluzsky <sss123next@list.ru>2012-08-17 23:55:14 +0000
committerAlexander Gluzsky <sss123next@list.ru>2012-08-17 23:55:14 +0000
commitd8a969bd605c890cffabb71d3e7dfac8855a6045 (patch)
tree0372a0e5e5a36c356640f427d3e8fae462b0f448 /plugins/New_GPG/src/options.cpp
parent39b4c53fad33b800d53ebfe16634272ddd69b6c3 (diff)
fixed possible memmory corruptions
git-svn-id: http://svn.miranda-ng.org/main/trunk@1492 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/options.cpp')
-rwxr-xr-xplugins/New_GPG/src/options.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index f03879c48b..80cbbbc559 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -669,22 +669,22 @@ static BOOL CALLBACK DlgProcGpgMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
GetDlgItemText(hwndDlg, IDC_IN_OPEN_TAG, tmp, 128);
DBWriteContactSettingTString(NULL, szGPGModuleName, "szInOpenTag", tmp);
mir_free(inopentag);
- inopentag = new TCHAR [_tcslen(tmp)+1];
+ inopentag = (TCHAR*)mir_alloc(sizeof(TCHAR)* (_tcslen(tmp)+1));
_tcscpy(inopentag, tmp);
GetDlgItemText(hwndDlg, IDC_IN_CLOSE_TAG, tmp, 128);
DBWriteContactSettingTString(NULL, szGPGModuleName, "szInCloseTag", tmp);
mir_free(inclosetag);
- inclosetag = new TCHAR [_tcslen(tmp)+1];
+ inclosetag = (TCHAR*)mir_alloc(sizeof(TCHAR)* (_tcslen(tmp)+1));
_tcscpy(inclosetag, tmp);
GetDlgItemText(hwndDlg, IDC_OUT_OPEN_TAG, tmp, 128);
DBWriteContactSettingTString(NULL, szGPGModuleName, "szOutOpenTag", tmp);
mir_free(outopentag);
- outopentag = new TCHAR [_tcslen(tmp)+1];
+ outopentag = (TCHAR*)mir_alloc(sizeof(TCHAR)* (_tcslen(tmp)+1));
_tcscpy(outopentag, tmp);
GetDlgItemText(hwndDlg, IDC_OUT_CLOSE_TAG, tmp, 128);
DBWriteContactSettingTString(NULL, szGPGModuleName, "szOutCloseTag", tmp);
mir_free(outclosetag);
- outclosetag = new TCHAR [_tcslen(tmp)+1];
+ outclosetag = (TCHAR*)mir_alloc(sizeof(TCHAR)*(_tcslen(tmp)+1));
_tcscpy(outclosetag, tmp);
}
return TRUE;