summaryrefslogtreecommitdiff
path: root/protocols/MSN/src/msn_commands.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-15 13:31:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-15 13:31:23 +0000
commit03db06c52cad84ecb2bf0b3fff8a518ff895dc19 (patch)
tree33051c9755dca9745607c6fafd233fc5f5f307b6 /protocols/MSN/src/msn_commands.cpp
parent714b5dfb8f159c8d54ef42c905c3c85f4b4e7962 (diff)
- crash fix in chats;
- static buffer returned, now with buffer overrun control; - warnings fixed git-svn-id: http://svn.miranda-ng.org/main/trunk@13604 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MSN/src/msn_commands.cpp')
-rw-r--r--protocols/MSN/src/msn_commands.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 6b9d3e3b2d..116d82c233 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -323,7 +323,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
}
int msgBytes;
- char *nick = NULL, *email;
+ char *nick = NULL, *email = NULL;
TCHAR *mChatID = NULL;
bool ubmMsg = strncmp(cmdString, "UBM", 3) == 0;
bool sdgMsg = strncmp(cmdString, "SDG", 3) == 0;
@@ -331,8 +331,10 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
if (sdgMsg) {
msgBytes = atol(datas.strMsgBytes);
- if (stricmp(datas.typeId, "MSGR")) return;
- } else {
+ if (stricmp(datas.typeId, "MSGR"))
+ return;
+ }
+ else {
if (ubmMsg) {
msgBytes = atol(datau.strMsgBytes);
nick = datau.fromEmail;