diff options
author | Volker Lendecke <vl@samba.org> | 2009-12-14 18:44:38 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-01-07 11:07:53 +0100 |
commit | 7633837026d56ee723ffb603c9bd884ff6c69ef3 (patch) | |
tree | 54fc8af9793937594f0b80149ef833fe46d26837 /source3/passdb | |
parent | 864ed92954315600ddcef69b21face95c06224a4 (diff) | |
download | samba-7633837026d56ee723ffb603c9bd884ff6c69ef3.tar.gz |
s3: Simplify pdb_set_plaintext_passwd: memcpy deals fine with 0 bytes
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_get_set.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index 149dde08020..968da9d8d14 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -1058,11 +1058,8 @@ bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext) return False; } - /* And copy it into the new buffer. */ - if (current_history_len) { - memcpy(new_history, pwhistory, - current_history_len*PW_HISTORY_ENTRY_LEN); - } + memcpy(new_history, pwhistory, + current_history_len*PW_HISTORY_ENTRY_LEN); pwhistory = new_history; } |