mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
s4:dsdb: Remove unnecessary MIN()
Since we have ensured that val->length >= sizeof(hash->hash), MIN(val->length, sizeof(hash->hash)) will here always be equal to sizeof(hash->hash). Signed-off-by: Jo Sutton <josutton@catalyst.net.nz> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
50c37d618f
commit
e50a69334e
@ -539,7 +539,7 @@ struct samr_Password *samdb_result_hash(TALLOC_CTX *mem_ctx, const struct ldb_me
|
||||
return NULL;
|
||||
}
|
||||
talloc_keep_secret(hash);
|
||||
memcpy(hash->hash, val->data, MIN(val->length, sizeof(hash->hash)));
|
||||
memcpy(hash->hash, val->data, sizeof(hash->hash));
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user