From d987a32c8c95c745e059c5bd9c1530d29b19f2dc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 11 Sep 2004 15:04:40 +0000 Subject: r2282: Remove one more magic constant from the source, replace with sizeof(). Andrew Bartlett (This used to be commit a089bcf503bfc91eead08d10539367886b7927cd) --- source4/rpc_server/samr/samdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/rpc_server/samr') diff --git a/source4/rpc_server/samr/samdb.c b/source4/rpc_server/samr/samdb.c index 0d4443958a..ac78dc60c7 100644 --- a/source4/rpc_server/samr/samdb.c +++ b/source4/rpc_server/samr/samdb.c @@ -462,7 +462,7 @@ struct samr_Password samdb_result_hash(struct ldb_message *msg, const char *attr const struct ldb_val *val = ldb_msg_find_ldb_val(msg, attr); ZERO_STRUCT(hash); if (val) { - memcpy(hash.hash, val->data, MIN(val->length, 16)); + memcpy(hash.hash, val->data, MIN(val->length, sizeof(hash.hash))); } return hash; } -- cgit