diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-02-09 09:49:40 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-02-09 09:49:40 +0000 |
commit | ce3ab93c2c61a22ac4cd38c05ea9e71e4f9695ae (patch) | |
tree | beca856ed866bdba40b885c5446b27ee41d4bece /protocols/IcqOscarJ/src/oscar_filetransfer.cpp | |
parent | 6494bd1f41a94d784c71ee4e089b76e4baca5761 (diff) |
ICQ: Added patch from ryo-oh-ki:
1. Compatibility fix for third-party local ICQ servers - ICQ Groupware and IserverD. Added new option in Network -> ICQ -> Account -> "[X] Legacy fix", it's off by default (wont connect to old ICQ servers).
2. Compatibility fix for old non-unicode ICQ clients (crashes on file transfer).
3. Fixed double-freed memory in oscar_filetransfer.cpp (crashes after file transfer).
git-svn-id: http://svn.miranda-ng.org/main/trunk@3499 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/oscar_filetransfer.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/oscar_filetransfer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp index d6723ded10..1352f6918f 100644 --- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp +++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp @@ -210,14 +210,19 @@ void CIcqProto::SafeReleaseFileTransfer(void **ft) SAFE_FREE(&ift->szFilename);
SAFE_FREE(&ift->szDescription);
SAFE_FREE(&ift->szSavePath);
- SAFE_FREE(&ift->szThisFile);
SAFE_FREE(&ift->szThisSubdir);
if (ift->pszFiles)
{
for (int i = 0; i < (int)ift->dwFileCount; i++)
+ {
+ // szThisFile can be a duplicate of pszFiles[i]
+ if (ift->szThisFile == ift->pszFiles[i])
+ ift->szThisFile = NULL;
SAFE_FREE(&ift->pszFiles[i]);
+ }
SAFE_FREE((void**)&ift->pszFiles);
}
+ SAFE_FREE(&ift->szThisFile);
// Invalidate transfer
ReleaseFileTransfer(ift);
#ifdef _DEBUG
|