Commit Graph

5 Commits

Author SHA1 Message Date
Paul Eggert
bec3001dcb Comment fix. 2001-08-28 20:29:12 +00:00
Paul Eggert
df72d04b36 (savedir): Remove size arg; it wasn't portable. All callers changed. 2001-01-13 05:59:29 +00:00
Paul Eggert
f996454418 (<unistd.h>): Do not include; there's no need.
(NAMLEN): Remove macro.
(malloc, realloc): Remove decls.
(stpcpy): Likewise.
("xalloc.h"): Include.
(NAME_SIZE_DEFAULT): New macro.
(savedir): Use xmalloc / xrealloc to allocate memory.
Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
Skip "" directory entries.
Use strlen to calculate directory entry length, since the old method
is rarely used these days and isn't worth supporting.
Check for integer overflow when calculating allocation size.
Use memcpy to copy entries, instead of stpcpy.
Set errno properly when returning NULL.
Check for readdir error.
2000-06-26 23:25:37 +00:00
Paul Eggert
977e420a35 (savedir): Work even if directory size is negative; this can
happen with some NFS screwups.
2000-02-24 00:15:00 +00:00
Paul Eggert
78646b1f11 Initial revision 2000-01-04 22:54:54 +00:00