mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
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 e1b21381f3
)
This commit is contained in:
parent
1738f7c2b7
commit
e4c8e7ad8a
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user