summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-06-19 15:29:35 -0700
committerJeremy Allison <jra@samba.org>2009-06-19 15:29:35 -0700
commitf262f80a1c7c9206c028abe9e2157b1dc955333b (patch)
tree2ad1d5fdc2690b75600a09f8a010329c61bcbe5b /source3
parent1e989dbb91175a6e040117ac77bcd58fba877605 (diff)
downloadsamba-f262f80a1c7c9206c028abe9e2157b1dc955333b.tar.gz
samba-f262f80a1c7c9206c028abe9e2157b1dc955333b.tar.bz2
samba-f262f80a1c7c9206c028abe9e2157b1dc955333b.zip
Fix coverity #920. Possible NULL deref.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/pdbedit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 23c4e71e0d..a464299438 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -708,6 +708,10 @@ static int new_user(const char *username, const char *fullname,
pwd1 = get_pass( "new password:", stdin_get);
pwd2 = get_pass( "retype new password:", stdin_get);
+ if (!pwd1 || !pwd2) {
+ fprintf(stderr, "Failed to read passwords.\n");
+ return -1;
+ }
ret = strcmp(pwd1, pwd2);
if (ret != 0) {
fprintf (stderr, "Passwords do not match!\n");