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 | 78f448b7d4b83f569d27e0abf6b1759c43ff21f3 (patch) | |
tree | 9f12d5b1fc1d89e2ba6a2f65d79cc7964399c2e5 /source/lib/util.c | |
parent | f8c83ce28b01ffd188dd10f0c731defaacb0fb45 (diff) | |
download | samba-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.c | 4 |
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; } |