[jitsi-dev] Outlook address book, bug?


#1

Hi all,

I have found a little (big?) bug in file

src\native\addrbook\msoutlook\ net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactSourceService.cxx

in line 135

memcpy(str, "\\Outlook.exe", 12 * sizeof(TCHAR));

it should be

memcpy(str, _T("\\Outlook.exe"), 12 * sizeof(TCHAR));

otherwise memcpy copies wrong bytes and the subsequent

fileAttributes = GetFileAttributes(pathValue);

fails.

I have tested the code in a visual c++ project in winXP-32bit and win7-64bit

Regards
Davide


#2

I have found a little (big?) bug in file

Thank you very much for the report!

While I agree with you that the code is technically incorrect and that
we should fix it, the binary committed in trunk is compiled without
_MBCS and without _UNICODE so it should practically function as
expected.

Does it sound OK to just commit the source code of your patch and not
modify the binary? I'm asking because the binary used to be
incorrectly reported as a virus by numerous anti-virus software
products and we had to contact each of them to ask them to fix their
false positives so the new binary might cause the warnings to reappear
(because we've updated our compilers to newer versions and they will
likely produce slightly different binaries).

src\native\addrbook\msoutlook\
net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactSourceService.cxx

in line 135

memcpy(str, "\\Outlook.exe", 12 * sizeof(TCHAR));

it should be

memcpy(str, _T("\\Outlook.exe"), 12 * sizeof(TCHAR));

otherwise memcpy copies wrong bytes and the subsequent

fileAttributes = GetFileAttributes(pathValue);

fails.

Are you compiling the binary yourself passing any of _MBCS and _UNICODE?

···

On Thu, May 5, 2011 at 3:42 PM, Davide Corda <davide.corda@abbeynet.it> wrote:


#3

Ok,

I'm testing Jitsi on win7 64bit and I'm trying to understand why I obtain always:
MAPI_E_NO_SUPPORT

Compiling and debugging the function I have understood that Outlook
must be the default mail client otherwise Jistsi reports this exception.

But whereas in wixp it was sufficient set outlook as default mail client, in win7-64
I continue to get this exception even if it's setted

I don'k know if it depends on win-64\jmsoutlookaddrbook.dll
or wrong mail client configuration :frowning:

Can you give me the new compiled dll?
  I will try in my pc

Thanx
Davide

···

Il 05/05/2011 15.12, Lyubomir Marinov ha scritto:

On Thu, May 5, 2011 at 3:42 PM, Davide Corda<davide.corda@abbeynet.it> wrote:

I have found a little (big?) bug in file

Thank you very much for the report!

While I agree with you that the code is technically incorrect and that
we should fix it, the binary committed in trunk is compiled without
_MBCS and without _UNICODE so it should practically function as
expected.

Does it sound OK to just commit the source code of your patch and not
modify the binary? I'm asking because the binary used to be
incorrectly reported as a virus by numerous anti-virus software
products and we had to contact each of them to ask them to fix their
false positives so the new binary might cause the warnings to reappear
(because we've updated our compilers to newer versions and they will
likely produce slightly different binaries).

src\native\addrbook\msoutlook\
net_java_sip_communicator_plugin_addrbook_msoutlook_MsOutlookAddrBookContactSourceService.cxx

in line 135

memcpy(str, "\\Outlook.exe", 12 * sizeof(TCHAR));

it should be

memcpy(str, _T("\\Outlook.exe"), 12 * sizeof(TCHAR));

otherwise memcpy copies wrong bytes and the subsequent

fileAttributes = GetFileAttributes(pathValue);

fails.

Are you compiling the binary yourself passing any of _MBCS and _UNICODE?

-----
Nessun virus nel messaggio.
Controllato da AVG - www.avg.com
Versione: 10.0.1321 / Database dei virus: 1500/3616 - Data di rilascio: 04/05/2011


#4

The architecture of Jitsi must be the same as that of Outlook. Outlook on
64-bit Windows is often 32-bit so you'll need 32-bit Jitsi in such a
scenario.