From 17c417e6e66e05d6bcee98cb1c7ebfa7d98a5347 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 27 Feb 2003 23:52:37 +0000 Subject: don't forget the NULL (This used to be commit f80610120483c929afbec83d2b8649cb3e5111b0) --- source3/smbd/dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 10241e88d9..95acf4a262 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 = 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->path = memcpy( (char *)&entry[1], path, strlen(path)+1 ); + entry->name = memcpy( &(entry->path[pathlen]), name, strlen(name)+1 ); + entry->dname = memcpy( &(entry->name[namelen]), dname, strlen(dname)+1 ); entry->snum = snum; /* Add the new entry to the linked list. */ -- cgit