summaryrefslogtreecommitdiff
path: root/source3/lib
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
commit9d5348c7587507796cdc448a89b953cf877226a3 (patch)
treee364c1dcae1b2731fcee1006bd1ba3f77ea0116d /source3/lib
parent34417b19f8501b556b4f80c5c391e2633c2a8997 (diff)
downloadsamba-9d5348c7587507796cdc448a89b953cf877226a3.tar.gz
samba-9d5348c7587507796cdc448a89b953cf877226a3.tar.bz2
samba-9d5348c7587507796cdc448a89b953cf877226a3.zip
removed need for scandir in client.c
fixed possible bug with readdirname on systems with NAMELEN != strlen (This used to be commit 78f448b7d4b83f569d27e0abf6b1759c43ff21f3)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 3bee53abbc..b3eef430f1 100644
--- a/source3/lib/util.c
+++ b/source3/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;
}