diff options
-rw-r--r-- | source3/passdb/pdb_get_set.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index f0c3fb193a..ba19b6bd43 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -1036,6 +1036,11 @@ bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext) */ pwhistory = (uchar *)pdb_get_pw_history(sampass, ¤t_history_len); + if ((current_history_len != 0) && (pwhistory == NULL)) { + DEBUG(1, ("pdb_set_plaintext_passwd: pwhistory == NULL!\n")); + return false; + } + if (current_history_len < pwHistLen) { /* * Ensure we have space for the needed history. |