[ libetpan-Bugs-942266 ] segmentation fault on mailstorage_connect()

"SourceForge.net" <[email protected]>
Newsgroups gmane.mail.libetpan.user
Message-ID <[email protected]>
Bugs item #942266, was opened at 2004-04-26 15:12
Message generated for change (Comment added) made by toniw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=429696&aid=942266&group_id=41064

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Toni Willberg (toniw)
Assigned to: Nobody/Anonymous (nobody)
Summary: segmentation fault on mailstorage_connect()

Initial Comment:
Hi. 

I've got a reproducable crash with example program frm-tree

It seems to crash when doing:
  ./frm-tree --driver=pop

It doesn't seem to matter if I give it the server
hostname, port, username, or whatever.

It works with imap driver.


$ gdb

(gdb) file frm-tree
Reading symbols from frm-tree...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run --driver=pop
Starting program:
/local/src/libetpan-0.32/tests/frm-tree --driver=pop
 
Program received signal SIGSEGV, Segmentation fault.
0x4007d893 in mailstorage_connect (storage=0x804a308)
at mailstorage.c:298
298     mailstorage.c: No such file or directory.
        in mailstorage.c
(gdb) bt
#0  0x4007d893 in mailstorage_connect
(storage=0x804a308) at mailstorage.c:298
#1  0x4007d5d9 in mailfolder_connect (folder=0x804a338)
at mailstorage.c:133
#2  0x080490a6 in main (argc=0, argv=0x0) at frm-tree.c:187
(gdb)


----------------------------------------------------------------------

>Comment By: Toni Willberg (toniw)
Date: 2004-04-26 15:23

Message:
Logged In: YES 
user_id=190645

After more testing, it seems to crash with the same error if
you try to use a nonexisting driver.

With more debugging, it seems to try to access local mail
folders if you give it a nonexisting driver:

<<<
(gdb) print storage
$1 = (struct mailstorage *) 0x804a308
(gdb) print storage[0]
$2 = {sto_id = 0x0, sto_data = 0x0, sto_session = 0x0,
sto_driver = 0x0, sto_shared_folders = 0x804a328,
sto_user_data = 0x0}
(gdb) print storage[0]
$3 = {sto_id = 0x0, sto_data = 0x0, sto_session = 0x0,
sto_driver = 0x0, sto_shared_folders = 0x804a328,
sto_user_data = 0x0}
(gdb) print storage[1]
$4 = {sto_id = 0x0, sto_data = 0x11, sto_session = 0x0,
sto_driver = 0x0, sto_shared_folders = 0x0, sto_user_data =
0x31}
(gdb) print storage[2]
$5 = {sto_id = 0x804a368 "/var/mail/twillber", sto_data =
0x0, sto_session = 0x804a308, sto_driver = 0x0,
sto_shared_folders = 0x0,
  sto_user_data = 0x0}
>>>

The $5 suggests it tries to use local mail.
I think it would be wise to give the user an error instead
of using some hardcoded default driver.

I actually tried to test pop3-functionality in first place... :)



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=429696&aid=942266&group_id=41064


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.