git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e989db
)
Fix coverity #920. Possible NULL deref.
author
Jeremy Allison
<jra@samba.org>
Fri, 19 Jun 2009 22:29:35 +0000
(15:29 -0700)
committer
Jeremy Allison
<jra@samba.org>
Fri, 19 Jun 2009 22:29:35 +0000
(15:29 -0700)
Jeremy.
source3/utils/pdbedit.c
patch
|
blob
|
history
diff --git
a/source3/utils/pdbedit.c
b/source3/utils/pdbedit.c
index 23c4e71e0d228d21b6e8161fa7511fd45f68df3b..a4642994388d05dce50091928701f1d45ba9b205 100644
(file)
--- 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");