Bug 1581 - GNU/Hurd libsmbclient segfault
Summary: GNU/Hurd libsmbclient segfault
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.5
Hardware: x86 other
: P3 critical
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-02 08:17 UTC by rocky.10.balboa
Modified: 2004-08-14 11:01 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rocky.10.balboa 2004-08-02 08:17:34 UTC
After compiled samba 3.0.5 under Debian GNU/Hurd K6, configured using
./configure --disable-rpc, and changed some tests application(fcntl_lock.c and
fcntl_lock64.c) with a dummy int main(){return 0;}, I get a segfault in the
find_charset_functions function.
This is the call stack when the segfault happens:
#0  0x01113193 in strcasecmp () from /lib/libc.so.0.3
#1  0x08078b3f in find_charset_functions ()
#2  0x08078f4f in smb_iconv_open ()
#3  0x0805dca4 in init_iconv ()
#4  0x0805c955 in lp_load ()
#5  0x08055b4f in smbc_init_context ()
#6  0x0804caf8 in smbc_init ()
#7  0x0804b531 in init_smb ()
#8  0x0804b60d in main ()

Where init_smb is a function defined by me.
Comment 1 rocky.10.balboa 2004-08-14 11:01:03 UTC
Changing in the file source/lib/iconv.c the line  
                if (strcasecmp(name, c->name) == 0) {
in the function 
charset_functions *find_charset_functions(const char *name)

with:
                if ((c->name) && (strcasecmp(name, c->name) == 0)) {

I solve this problem. I think that modification will not cause problems on other
archs too.