summaryrefslogtreecommitdiffstats
path: root/source/lib/util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-05-07 05:19:52 +0000
committerAndrew Tridgell <tridge@samba.org>2001-05-07 05:19:52 +0000
commit78f448b7d4b83f569d27e0abf6b1759c43ff21f3 (patch)
tree9f12d5b1fc1d89e2ba6a2f65d79cc7964399c2e5 /source/lib/util.c
parentf8c83ce28b01ffd188dd10f0c731defaacb0fb45 (diff)
downloadsamba-78f448b7d4b83f569d27e0abf6b1759c43ff21f3.tar.gz
samba-78f448b7d4b83f569d27e0abf6b1759c43ff21f3.tar.xz
samba-78f448b7d4b83f569d27e0abf6b1759c43ff21f3.zip
removed need for scandir in client.c
fixed possible bug with readdirname on systems with NAMELEN != strlen
Diffstat (limited to 'source/lib/util.c')
-rw-r--r--source/lib/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/lib/util.c b/source/lib/util.c
index 3bee53abbcc..b3eef430f11 100644
--- a/source/lib/util.c
+++ b/source/lib/util.c
@@ -1187,7 +1187,9 @@ char *readdirname(DIR *p)
{
static pstring buf;
- memcpy(buf, dname, NAMLEN(ptr)+1);
+ int len = NAMLEN(ptr);
+ memcpy(buf, dname, len);
+ buf[len] = 0;
dname = buf;
}