summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-02-16 22:11:49 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-02-16 22:11:49 +0000
commit56d5f6bad267d758cd375d5ad7172ce097cab63c (patch)
tree80d3c9ed0b571a98399336ae3de65969d76fbb45
parent562f73d5817b88f7a83d63a4583dd4f6535a9849 (diff)
downloadsamba-56d5f6bad267d758cd375d5ad7172ce097cab63c.tar.gz
samba-56d5f6bad267d758cd375d5ad7172ce097cab63c.tar.bz2
samba-56d5f6bad267d758cd375d5ad7172ce097cab63c.zip
dont strdup() possibly null values.
(This used to be commit 0511589088dc3e990f7b1a38a06489814c49ec1b)
-rw-r--r--source3/utils/net_ads.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 03ec2920b9..b9388f3349 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -101,7 +101,9 @@ retry:
free(prompt);
}
- ads->password = strdup(opt_password);
+ if (opt_password)
+ ads->password = strdup(opt_password);
+
ads->user_name = strdup(opt_user_name);
status = ads_connect(ads);