summaryrefslogtreecommitdiff
path: root/source3/smbd/dir.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-10 09:16:05 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-10 09:16:05 +0000
commitec7a1994b0b937f95379a32bb135e816d407d843 (patch)
tree30af0a81755286192b014e5d137b4fbf45a9ecf8 /source3/smbd/dir.c
parent868d169a4084c24924a419adc46a54f721aa2efd (diff)
downloadsamba-ec7a1994b0b937f95379a32bb135e816d407d843.tar.gz
samba-ec7a1994b0b937f95379a32bb135e816d407d843.tar.bz2
samba-ec7a1994b0b937f95379a32bb135e816d407d843.zip
Some cleanups:
- Don't use pstrcpy into an allocated string - use safe_strcpy() directly instead. - Keep a copy of the 'server_info' attached to the vuid. In future use this for things like the session key, homedir and full name instead of current copies. - Try to avoid memory leak/segfault on Realloc failure - clear up #endif comments Andrew Bartlett (This used to be commit 162477bb086827950b6cb71afa9bef62c2753c2e)
Diffstat (limited to 'source3/smbd/dir.c')
-rw-r--r--source3/smbd/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 9e8de2979b..e022d26ea3 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -907,7 +907,7 @@ void *OpenDir(connection_struct *conn, const char *name, BOOL use_veto)
dirp->current = dirp->data;
}
- pstrcpy(dirp->data+used,n);
+ safe_strcpy(dirp->data+used,n, dirp->mallocsize - used - 1);
used += l;
dirp->numentries++;
}