From: Volker Lendecke Date: Sat, 7 Apr 2012 12:17:25 +0000 (+0200) Subject: s3: Use talloc_get_size instead of strlen X-Git-Tag: samba-4.0.0alpha19~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cca094514fa4488b4ea2a6747b51443ff02a4f0;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index e01a92e333d..c71e864648a 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,