diff options
author | Gerald Carter <jerry@samba.org> | 2004-05-07 15:59:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:29 -0500 |
commit | c385fb467fc2a669d54b9a2faddbf66f9e4699c6 (patch) | |
tree | 86a73bc6d000528f351194af6c94e2e9fe6cfce8 | |
parent | 7c1cfb16c0b2f0128afca0b01036567253a3f92a (diff) | |
download | samba-c385fb467fc2a669d54b9a2faddbf66f9e4699c6.tar.gz samba-c385fb467fc2a669d54b9a2faddbf66f9e4699c6.tar.xz samba-c385fb467fc2a669d54b9a2faddbf66f9e4699c6.zip |
r557: another patch from Stephan Kulow <coolo@suse.de> -- check cli * before dereferencing it
-rw-r--r-- | source/libsmb/libsmbclient.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index 50af2237269..2ef054473ba 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -1991,6 +1991,12 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) DEBUG(99, ("Found master browser %s\n", inet_ntoa(ip_list[i].ip))); cli = get_ipc_connect_master_ip(&ip_list[i], workgroup, &u_info); + + /* cli == NULL is the master browser refused to talk or + could not be found */ + if ( !cli ) + continue; + fstrcpy(server, cli->desthost); cli_shutdown(cli); |