Package: centericq
Version: 4.21.0-9
Severity: important
Tags: patch
centericq fail to register new jabber account. it crash in libjabber:
Program received signal SIGSEGV, Segmentation fault.
0x0821e509 in jab_poll (j=0x8399430, timeout=0) at jconn.c:353
353 FD_SET(j->fd, &fds);
(gdb) print j->fd
$7 = -1
(gdb) print fds
$8 = {__fds_bits = {0 <repeats 32 times>}}
(gdb) print j->state
$9 = 2
(gdb) bt
#0 0x0821e509 in jab_poll (j=0x8399430, timeout=0) at jconn.c:353
#1 0x080dff49 in jabberhook::main (this=0x82fdc00) at jabberhook.cc:171
#2 0x080e2f4e in jabberhook::regnick (this=0x82fdc00, [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]) at
jabberhook.cc:563
#3 0x0809f75c in imcontroller::jabberregistration (this=0x82fd244,
[EMAIL PROTECTED]) at imcontroller.cc:203
#4 0x0809fe6f in imcontroller::registration (this=0x7ffffff,
[EMAIL PROTECTED]) at imcontroller.cc:330
#5 0x08095681 in accountmanager::exec (this=0x82fd238)
at accountmanager.cc:202
#6 0x0805c5fa in centericq::mainloop (this=0x82fdba0) at centericq.cc:202
#7 0x0805eddd in centericq::exec (this=0x82fdba0) at centericq.cc:101
#8 0x080de160 in main (argc=2, argv=0xbfe81734) at centermain.cc:60
There is two problem:
1) jab_poll don't check j->fd value and attempt set negatve value to fds.
2) information stored into j->server incorrect. e.g. in my situation in
j->server stored "internal.server.org:5222", make_addr unable to convert
this addres with gethostbyname() call. We need strip port number before try
resolve address.
Patch for first problem:
--- libjabber-0.1.orig/jconn.c 2005-08-26 15:07:00.000000000 +0400
+++ libjabber-0.1/jconn.c 2005-12-21 19:29:55.000000000 +0300
@@ -346,7 +346,7 @@
struct timeval tv;
int r;
- if (!j || j->state == JCONN_STATE_OFF)
+ if (!j || j->state == JCONN_STATE_OFF || j->fd == -1)
return;
FD_ZERO(&fds);
For second problem, I don't know, how and where right strip port number.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-rc2-git3
Locale: LANG=ru_RU.KOI8-R, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)
Versions of packages centericq depends on:
ii centericq-com 4.21.0-9 A text-mode multi-protocol instant
ii libc6 2.3.5-8 GNU C Library: Shared libraries an
ii libcomerr2 1.38+1.39-WIP-2005.12.10-1 common error description library
ii libcurl3 7.15.1-1 Multi-protocol file transfer libra
ii libgcc1 1:4.0.2-4 GCC support library
ii libgnutls12 1.2.9-2 the GNU TLS library - runtime libr
ii libgpg-error0 1.1-4 library for common error values an
ii libgpgme11 1.1.0-1 GPGME - GnuPG Made Easy
ii libidn11 0.5.18-1 GNU libidn library, implementation
ii libjpeg62 6b-10 The Independent JPEG Group's JPEG
ii libkrb53 1.4.3-4 MIT Kerberos runtime libraries
ii libncurses5 5.5-1 Shared libraries for terminal hand
ii libssl0.9.8 0.9.8a-4 SSL shared libraries
ii libstdc++6 4.0.2-4 The GNU Standard C++ Library v3
ii zlib1g 1:1.2.3-8 compression library - runtime
Versions of packages centericq recommends:
ii firefox [www-browser] 1.5.dfsg-2 lightweight web browser based on M
ii links [www-browser] 0.99+1.00pre12-1 Character mode WWW browser
ii lynx [www-browser] 2.8.5-2sarge1 Text-mode WWW Browser
pn sox <none> (no description available)
-- no debconf information
--- libjabber-0.1.orig/jconn.c 2005-08-26 15:07:00.000000000 +0400
+++ libjabber-0.1/jconn.c 2005-12-21 19:29:55.000000000 +0300
@@ -346,7 +346,7 @@
struct timeval tv;
int r;
- if (!j || j->state == JCONN_STATE_OFF)
+ if (!j || j->state == JCONN_STATE_OFF || j->fd == -1)
return;
FD_ZERO(&fds);