git.samba.org
/
sfrench
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e17d12c
)
s3: Use talloc_get_size instead of strlen
author
Volker Lendecke
<vl@samba.org>
Sat, 7 Apr 2012 12:17:25 +0000
(14:17 +0200)
committer
Volker Lendecke
<vl@samba.org>
Tue, 10 Apr 2012 11:20:22 +0000
(13:20 +0200)
We've just talloc_asprintf'ed the fullpath, so talloc_get_size knows the
strlen.
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Tue Apr 10 13:20:22 CEST 2012 on sn-devel-104
source3/smbd/files.c
patch
|
blob
|
history
diff --git
a/source3/smbd/files.c
b/source3/smbd/files.c
index e01a92e333de0c5ed566fec2adf322b2b901543e..c71e864648a9ad4a30a60fa09b43692a6129d05a 100644
(file)
--- 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,