From e7290255f5ba1dd913bb3d40e71654cff1cfe4cf Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 14 Dec 2009 18:39:19 +0100 Subject: [PATCH] s3: Make use of talloc_array in pdb_set_plaintext_passwd() --- source3/passdb/pdb_get_set.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c index af99e8110cb..bea4c3278e0 100644 --- a/source3/passdb/pdb_get_set.c +++ b/source3/passdb/pdb_get_set.c @@ -1051,8 +1051,9 @@ bool pdb_set_plaintext_passwd(struct samu *sampass, const char *plaintext) /* * Ensure we have space for the needed history. */ - uchar *new_history = (uchar *)TALLOC( - sampass, pwHistLen*PW_HISTORY_ENTRY_LEN); + uchar *new_history = talloc_array( + sampass, uchar, + pwHistLen*PW_HISTORY_ENTRY_LEN); if (!new_history) { return False; } -- 2.11.4.GIT