From e1fe0a65e20128c452e2188914b917b83f307325 Mon Sep 17 00:00:00 2001 From: MikalaiR <nikolay.romanovich@narod.ru> Date: Sun, 2 Aug 2015 13:51:03 +0000 Subject: SkypeWeb: fix memory corruption git-svn-id: http://svn.miranda-ng.org/main/trunk@14818 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_chatrooms.cpp | 14 +++++++------- protocols/SkypeWeb/src/skype_contacts.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'protocols') diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 2bb553f785..464af1c359 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -585,9 +585,9 @@ int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam) { static const struct gc_item Items[] = { - { LPGENT("&Invite user..."), 10, MENU_ITEM, FALSE }, + { LPGENT("&Invite user..."), 10, MENU_ITEM, FALSE }, { LPGENT("&Leave chat session"), 20, MENU_ITEM, FALSE }, - { LPGENT("&Change topic"), 30, MENU_ITEM, FALSE } + { LPGENT("&Change topic"), 30, MENU_ITEM, FALSE } }; gcmi->nItems = _countof(Items); gcmi->Item = (gc_item*)Items; @@ -603,11 +603,11 @@ int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam) { static const struct gc_item Items[] = { - { LPGENT("Kick &user"), 10, MENU_ITEM }, - { NULL, 0, MENU_SEPARATOR }, - { LPGENT("Set &role"), 20, MENU_NEWPOPUP }, - { LPGENT("&Admin"), 30, MENU_POPUPITEM }, - { LPGENT("&User"), 40, MENU_POPUPITEM } + { LPGENT("Kick &user"), 10, MENU_ITEM }, + { NULL, 0, MENU_SEPARATOR }, + { LPGENT("Set &role"), 20, MENU_NEWPOPUP }, + { LPGENT("&Admin"), 30, MENU_POPUPITEM }, + { LPGENT("&User"), 40, MENU_POPUPITEM } }; gcmi->nItems = _countof(Items); gcmi->Item = (gc_item*)Items; diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index ab56d537db..cbe321b7d2 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -282,7 +282,7 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response) } } - if (type == "skype" || type == "msn") skypenames.insert(mir_strdup(skypename.c_str())); + if (type == "skype") skypenames.insert(mir_strdup(skypename.c_str())); } } } @@ -294,7 +294,7 @@ void CSkypeProto::LoadContactList(const NETLIBHTTPREQUEST *response) { LIST<char> users(1); for (; i < skypenames.getCount() && users.getCount() <= 50; i++) - users.insert(skypenames[i]); + users.insert(mir_strdup(skypenames[i])); PushRequest(new GetContactsInfoRequest(m_szTokenSecret, users), &CSkypeProto::LoadContactsInfo); -- cgit v1.2.3