diff options
author | Jeremy Allison <jra@samba.org> | 2006-10-20 08:14:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2006-10-20 08:14:38 +0000 |
commit | 562c58439e8857adc24d3ac0752de6e0c1b8300e (patch) | |
tree | a31618d92e4814bd55b474459be5bd837fc2e9f2 /source/utils | |
parent | 3d8f02f2ec623aa06096eb6ab617145ae588eea7 (diff) | |
download | samba-562c58439e8857adc24d3ac0752de6e0c1b8300e.tar.gz samba-562c58439e8857adc24d3ac0752de6e0c1b8300e.tar.xz samba-562c58439e8857adc24d3ac0752de6e0c1b8300e.zip |
r19424: Protect against username == NULL
Jeremy.
Diffstat (limited to 'source/utils')
-rw-r--r-- | source/utils/net.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/utils/net.c b/source/utils/net.c index a6fae57bc33..7b97476a25e 100644 --- a/source/utils/net.c +++ b/source/utils/net.c @@ -244,6 +244,9 @@ static char *get_user_and_realm(const char *username) { char *user_and_realm = NULL; + if (!username) { + return NULL; + } if (strchr_m(username, '@')) { user_and_realm = SMB_STRDUP(username); } else { @@ -257,6 +260,7 @@ static char *get_user_and_realm(const char *username) /**************************************************************************** connect to \\server\ipc$ using KRB5 ****************************************************************************/ + NTSTATUS connect_to_ipc_krb5(struct cli_state **c, struct in_addr *server_ip, const char *server_name) { |