summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 17:01:00 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:08:18 -0700
commitb70f23c2b581c5d455362ab37f4846de9a910055 (patch)
treecf95e8d35a03d1e39d5926d2e03d7046d42cae64 /source3/winbindd/winbindd_util.c
parentce21d0804012da27cec72abe896352d7f0e7e1e5 (diff)
downloadsamba-b70f23c2b581c5d455362ab37f4846de9a910055.tar.gz
samba-b70f23c2b581c5d455362ab37f4846de9a910055.tar.bz2
samba-b70f23c2b581c5d455362ab37f4846de9a910055.zip
Correctly check for errors in strlower_m() returns.
Diffstat (limited to 'source3/winbindd/winbindd_util.c')
-rw-r--r--source3/winbindd/winbindd_util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index 656735633b..c36ae0bb0a 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -931,7 +931,7 @@ void fill_domain_username(fstring name, const char *domain, const char *user, bo
fstring tmp_user;
fstrcpy(tmp_user, user);
- strlower_m(tmp_user);
+ (void)strlower_m(tmp_user);
if (can_assume && assume_domain(domain)) {
strlcpy(name, tmp_user, sizeof(fstring));
@@ -954,7 +954,10 @@ char *fill_domain_username_talloc(TALLOC_CTX *mem_ctx,
char *tmp_user, *name;
tmp_user = talloc_strdup(mem_ctx, user);
- strlower_m(tmp_user);
+ if (!strlower_m(tmp_user)) {
+ TALLOC_FREE(tmp_user);
+ return NULL;
+ }
if (can_assume && assume_domain(domain)) {
name = tmp_user;