summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 15:35:28 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:06:54 -0700
commit526e875cec15761099438e17df3f56bc2bd5b761 (patch)
tree8ad776c58b3a25b8739b03cdaf330c295bc570b7 /source3/libnet
parente1ec86a49ce1d7c3ebe99fc175ffad70a03c4a0b (diff)
downloadsamba-526e875cec15761099438e17df3f56bc2bd5b761.tar.gz
samba-526e875cec15761099438e17df3f56bc2bd5b761.tar.bz2
samba-526e875cec15761099438e17df3f56bc2bd5b761.zip
Check error returns from strupper_m() (in all reasonable places).
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_join.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 399c13a86a..5806f7bc75 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -136,7 +136,10 @@ static ADS_STATUS libnet_connect_ads(const char *dns_domain_name,
*cp++ = '\0';
SAFE_FREE(my_ads->auth.realm);
my_ads->auth.realm = smb_xstrdup(cp);
- strupper_m(my_ads->auth.realm);
+ if (!strupper_m(my_ads->auth.realm)) {
+ ads_destroy(&my_ads);
+ return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ }
}
}
@@ -381,7 +384,9 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
if (!spn) {
return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
}
- strupper_m(spn);
+ if (!strupper_m(spn)) {
+ return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ }
spn_array[0] = spn;
if (!name_to_fqdn(my_fqdn, r->in.machine_name)