diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-05-07 05:19:52 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-05-07 05:19:52 +0000 |
commit | 9d5348c7587507796cdc448a89b953cf877226a3 (patch) | |
tree | e364c1dcae1b2731fcee1006bd1ba3f77ea0116d /source3/lib | |
parent | 34417b19f8501b556b4f80c5c391e2633c2a8997 (diff) | |
download | samba-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.c | 4 |
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; } |