diff options
author | Gerald Carter <jerry@samba.org> | 2003-02-27 23:21:37 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-02-27 23:21:37 +0000 |
commit | e4c8e7ad8a154d9806a7b1214adb9982dc28f4b1 (patch) | |
tree | 19998c40f6a5ba919c6339ff5887090cbab92331 | |
parent | 1738f7c2b7b0d2bdfa6414267d20b2c08e204f78 (diff) | |
download | samba-e4c8e7ad8a154d9806a7b1214adb9982dc28f4b1.tar.gz samba-e4c8e7ad8a154d9806a7b1214adb9982dc28f4b1.tar.bz2 samba-e4c8e7ad8a154d9806a7b1214adb9982dc28f4b1.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 e1b21381f3b5cf6f97c101642e9286df9987998e)
-rw-r--r-- | source3/smbd/dir.c | 6 |
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. */ |