1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-18 02:45:23 +02:00

(savedir): Work even if directory size is

negative; this can happen with some screwy NFS configurations.
This commit is contained in:
Jim Meyering
2000-03-08 14:50:05 +00:00
parent 45b3b0a96d
commit 7157c29ee8

View File

@@ -89,7 +89,8 @@ savedir (const char *dir, off_t name_size)
/* Be sure name_size is at least `1' so there's room for
the final NUL byte. */
name_size += !name_size;
if (name_size <= 0)
name_size = 1;
name_space = (char *) malloc (name_size);
if (name_space == NULL)