summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-02-27 23:24:26 +0000
committerGerald Carter <jerry@samba.org>2003-02-27 23:24:26 +0000
commit3a7d807ec9974f0b4d7938a4b734c2c7f350cd08 (patch)
tree1b58632ae72be154eceefb723c2d659d5e65e29a
parentdc1cd583cb4224f0fdb8c4529b59a66eeddba2f9 (diff)
downloadsamba-3a7d807ec9974f0b4d7938a4b734c2c7f350cd08.tar.gz
samba-3a7d807ec9974f0b4d7938a4b734c2c7f350cd08.tar.bz2
samba-3a7d807ec9974f0b4d7938a4b734c2c7f350cd08.zip
and the winner of "i should have just written it in assembly
is..." don't use pstrcpy() when you are not dealing with pstrings. (This used to be commit 7d547f50f914747291acc71fd3544ad92ce91f0e)
-rw-r--r--source3/smbd/dir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 2a5f7ffd71..10241e88d9 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1028,9 +1028,9 @@ void DirCacheAdd( const char *path, char *name, char *dname, int snum )
return; /* so just return as if nothing happened. */
/* Set pointers correctly and load values. */
- entry->path = pstrcpy( (char *)&entry[1], path);
- entry->name = pstrcpy( &(entry->path[pathlen]), name);
- entry->dname = pstrcpy( &(entry->name[namelen]), dname);
+ entry->path = memcpy( (char *)&entry[1], path, strlen(path) );
+ entry->name = memcpy( &(entry->path[pathlen]), name, strlen(name) );
+ entry->dname = memcpy( &(entry->name[namelen]), dname, strlen(dname) );
entry->snum = snum;
/* Add the new entry to the linked list. */