nmlorg / naim

naim is a console client for AOL Instant Messenger (AIM), AOL I Seek You (ICQ), Internet Relay Chat (IRC), and The lily CMC.
http://naim.n.ml.org/
1 stars 0 forks source link

Assertion Failure at function toc_got_data, file toc2.c, line 1632. #35

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?

1. Start Naim

> What is the expected output? What do you see instead?

After connecting all buddies, I get the crash in the subject.

Assertion failed: ((info[0] == -2) || (info[0] == '<') || ((info[0] == 0) && 
(info[1] == '<'))), function toc_got_data, file toc2.c, line 1632.
                                                                           Abort (core dumped)

> What version of naim are you using? On what operating system?
> % naim --version

naim 0.11.8.3.2

> % uname -a

FreeBSD oldprime.gushi.org 6.4-STABLE FreeBSD 6.4-STABLE #0: Fri Dec  5 
11:32:35 EST 2008     danm@oldprime.gushi.org:/usr/obj/usr/src/sys/GENERIC  i386

> Please provide any additional information below.

Core is available, and I believe you already have a shell on this system, but 
catch me on aim:gushicell, or danielmahoneyIV in facebook chat (assuming your 
aim is also broken) and I can give you access to the binary, the core, and the 
debugger on this system.

Original issue reported on code.google.com by goo...@gushi.org on 7 Oct 2010 at 6:13

GoogleCodeExporter commented 9 years ago
After rebuilding with debug symbols, and waiting again for it to crash, I have 
a result:

(gdb) bt                 
#0  0x281d2ecb in kill () from /lib/libc.so.6
#1  0x281d2e68 in raise () from /lib/libc.so.6
#2  0x281d1b78 in abort () from /lib/libc.so.6
#3  0x281addb8 in __assert () from /lib/libc.so.6
#4  0x0808f540 in toc_got_data (c=0x84cf000, 
    buffer=0x84cd000 "*\002�t\003kUSER_INFO:meanwhilewethink:T:0:1286527368:0: OU:268566529:<html><body>VS showerin'...</body></html>�", 
    bufferpos=0x8181f30) at toc2.c:1632
#5  0x08082542 in firetalk_select_custom (n=13, fd_read=0xbfbfea90, 
fd_write=0xbfbfea10, fd_except=0x0, timeout=0xbfbfea08) at firetalk.c:2580
#6  0x08077061 in main (argc=1, args=0xbfbfec94) at main.c:437

Original comment by goo...@gushi.org on 8 Oct 2010 at 5:56

GoogleCodeExporter commented 9 years ago
#4  0x0808f540 in toc_got_data (c=0x84cf000, 
    buffer=0x84cd000 "*\002�t\003kUSER_INFO:meanwhilewethink:T:0:1286527368:0: OU:268566529:<html><body>VS showerin'...</body></html>�", 
    bufferpos=0x8181f30) at toc2.c:1632
1632                    assert((info[0] == -2) || (info[0] == '<') || ((info[0] 
== 0) && (info[1] == '<')));
(gdb) print info[0]
$1 = 0 '\0'

Original comment by goo...@gushi.org on 8 Oct 2010 at 6:02

GoogleCodeExporter commented 9 years ago
(gdb) print info[1]
$2 = 110 'n'

Original comment by goo...@gushi.org on 8 Oct 2010 at 6:03

GoogleCodeExporter commented 9 years ago
Looks like this happens when a specific ICQ user goes away; I could repro given 
a test account on my laptop.  Here's a breakpoint just before the inevitable 
crash:

Breakpoint 1, toc_got_data (c=0x100dc0400, buffer=0x100dbe400 "*\002áv", 
bufferpos=0x1002067c0) at toc2.c:1616
1616                    away = info;
(gdb) print info
$1 = 0x7fff5fbfbea9 "þI am away from my computer.þ"
(gdb) hexdump info
5FBFBEA9 : FE 49 20 61  6D 20 61 77 - 61 79 20 66  72 6F 6D 20 .I am away from
(gdb) hexdump info+16
5FBFBEB9 : 6D 79 20 63  6F 6D 70 75 - 74 65 72 2E  FE 00 2D 36 my computer...-6
(gdb) hexdump info+32
5FBFBEC9 : 45 36 31 2D  36 39 36 44 - 2D 30 30 30  30 2D 30 30 E61-696D-0000-00
(gdb) hexdump info+48
5FBFBED9 : 30 30 30 30  30 30 30 30 - 30 30 00 46  46 46 46 46 0000000000.FFFFF

As far as I can tell, what's going on here is that when an ICQ user is away, 
they have no away message, but their profile becomes an away message -- but 
with no HTML tags.  naim then subsequently pukes.

Original comment by joshua.a...@gmail.com on 1 Jul 2011 at 5:20

GoogleCodeExporter commented 9 years ago
Here's a patch.  Give this a shot.

Original comment by joshua.a...@gmail.com on 1 Jul 2011 at 5:25

Attachments: