diff options
-rw-r--r-- | protocols/Gadu-Gadu/src/import.cpp | 4 |
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);
}
|