summaryrefslogtreecommitdiff
path: root/source3/auth/pass_check.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/auth/pass_check.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/auth/pass_check.c')
-rw-r--r--source3/auth/pass_check.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index ca99261678..f2d1fc241b 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -867,7 +867,9 @@ NTSTATUS pass_check(const struct passwd *pass,
/* try all lowercase if it's currently all uppercase */
if (strhasupper(pass2)) {
- strlower_m(pass2);
+ if (!strlower_m(pass2)) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
nt_status = password_check(pass2, (const void *)rhost);
if (NT_STATUS_IS_OK(nt_status)) {
return (nt_status);
@@ -880,7 +882,9 @@ NTSTATUS pass_check(const struct passwd *pass,
}
/* last chance - all combinations of up to level chars upper! */
- strlower_m(pass2);
+ if (!strlower_m(pass2)) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
nt_status = string_combinations(pass2, password_check, level,
(const void *)rhost);