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 | 3bbf2f1e0a9078b6888866979642962c8b8a90af (patch) | |
tree | 6ab30bf8070675ee3cf70f0f7b321a138a9b3eff /source3/libsmb | |
parent | ba8a59dbf43a18bb93007b22758cfe5f9882dd3e (diff) | |
download | samba-3bbf2f1e0a9078b6888866979642962c8b8a90af.tar.gz samba-3bbf2f1e0a9078b6888866979642962c8b8a90af.tar.bz2 samba-3bbf2f1e0a9078b6888866979642962c8b8a90af.zip |
r557: another patch from Stephan Kulow <coolo@suse.de> -- check cli * before dereferencing it
(This used to be commit c385fb467fc2a669d54b9a2faddbf66f9e4699c6)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmbclient.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 50af223726..2ef054473b 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/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); |