diff options
author | Jeremy Allison <jra@samba.org> | 2012-08-08 15:35:28 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-08-09 12:06:54 -0700 |
commit | 526e875cec15761099438e17df3f56bc2bd5b761 (patch) | |
tree | 8ad776c58b3a25b8739b03cdaf330c295bc570b7 /source3/libnet | |
parent | e1ec86a49ce1d7c3ebe99fc175ffad70a03c4a0b (diff) | |
download | samba-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.c | 9 |
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) |