summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Tokarz <wsx22@o2.pl>2014-07-27 22:30:09 +0000
committerSzymon Tokarz <wsx22@o2.pl>2014-07-27 22:30:09 +0000
commit2962c09b72e3f26c6057077db721a9c6fe3ae180 (patch)
tree2e126d9fd85ff54f798755e154cedb4102a31558
parent8b90bf322754f7b6dee99fd8dcef21f4b251d6ba (diff)
Gadu-Gadu protocol
- Fix importing contact list from file git-svn-id: http://svn.miranda-ng.org/main/trunk@9976 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Gadu-Gadu/src/import.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp
index 5b528ee0ef..a8c58c3190 100644
--- a/protocols/Gadu-Gadu/src/import.cpp
+++ b/protocols/Gadu-Gadu/src/import.cpp
@@ -378,11 +378,11 @@ INT_PTR GGPROTO::import_text(WPARAM wParam, LPARAM lParam)
if (f && st.st_size)
{
- char *contacts = (char*)malloc(st.st_size * sizeof(char));
+ char *contacts = (char*)mir_calloc((st.st_size * sizeof(char)) + 1); // zero-terminate it
fread(contacts, sizeof(char), st.st_size, f);
fclose(f);
parsecontacts(contacts);
- free(contacts);
+ mir_free(contacts);
MessageBox(NULL, TranslateT("List import successful."), m_tszUserName, MB_OK | MB_ICONINFORMATION);
}