From 3cca094514fa4488b4ea2a6747b51443ff02a4f0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 7 Apr 2012 14:17:25 +0200 Subject: s3: Use talloc_get_size instead of strlen We've just talloc_asprintf'ed the fullpath, so talloc_get_size knows the strlen. Autobuild-User: Volker Lendecke Autobuild-Date: Tue Apr 10 13:20:22 CEST 2012 on sn-devel-104 --- source3/smbd/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/smbd') diff --git a/source3/smbd/files.c b/source3/smbd/files.c index e01a92e333..c71e864648 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -612,7 +612,7 @@ NTSTATUS file_name_hash(connection_struct *conn, if (!fullpath) { return NT_STATUS_NO_MEMORY; } - *p_name_hash = hash(fullpath, strlen(fullpath) + 1, 0); + *p_name_hash = hash(fullpath, talloc_get_size(fullpath), 0); DEBUG(10,("file_name_hash: %s hash 0x%x\n", fullpath, -- cgit