Package: centerim-utf8
Version: 4.22.10-1
Severity: important
Tags: patch
When I sign in to MSN centerim often segfaults.
After looking into the issue it seems to be due to a missing field in a
response from the MSN server.
args[5] here from notificationserver.cpp line ~200 will be undefined since
the <vector> only has 5 entries:
this->myNotificationServer()->externalCallbacks.gotNewReverseListEntry(this, \
args[4], decodeURL(args[5]));
This is because the MSN server is sometimes sending:
ADD 0 RL 0 [email protected]
Instead of this:
ADD 0 RL 0 [email protected] User%20Name
So my quick fix to this (without any knowledge on the MSN protocol) was to
copy [email protected] to args[5] and that way avoiding the segfault.
I'm attaching an patch that shows how I solved my issue.
-- System Information:
Debian Release: 6.0.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages centerim-utf8 depends on:
ii centerim-common 4.22.10-1 A text-mode multi-protocol instant
ii libc6 2.11.3-4 Embedded GNU C Library: Shared lib
ii libcurl3-gnutls 7.21.0-2.1+squeeze2 Multi-protocol file transfer libra
ii libgcc1 1:4.4.5-8 GCC support library
ii libgnutls26 2.8.6-1+squeeze2 the GNU TLS library - runtime libr
ii libgpg-error0 1.6-1 library for common error values an
ii libgpgme11 1.2.0-1.2 GPGME - GnuPG Made Easy
ii libncursesw5 5.7+20100313-5 shared libraries for terminal hand
ii libstdc++6 4.4.5-8 The GNU Standard C++ Library v3
Versions of packages centerim-utf8 recommends:
ii lynx-cur [www-browser] 2.8.8dev.5-1 Text-mode WWW Browser with NLS sup
pn sox <none> (no description available)
ii w3m [www-browser] 0.5.2-9 WWW browsable pager with excellent
centerim-utf8 suggests no packages.
-- no debconf information
--- tmp/centerim-4.22.10/libmsn/msn/notificationserver.cpp 2010-10-26
19:19:06.000000000 +0200
+++ centerim-4.22.10/libmsn/msn/notificationserver.cpp 2012-12-13
23:13:09.000000000 +0100
@@ -191,9 +191,14 @@
void NotificationServerConnection::handle_ADD(std::vector<std::string> &
args)
{
+ //std::cerr << "DEBUG handle_ADD size: " << args.size() << std::endl;
this->assertConnectionStateIsAtLeast(NS_CONNECTED);
if (args[2] == "RL")
{
+ if (args.size() == 5)
+ {
+ args.push_back(args[4]);
+ }
this->myNotificationServer()->externalCallbacks.gotNewReverseListEntry(this,
args[4], decodeURL(args[5]));
}
else