From: Paul Eggert Date: Thu, 24 Feb 2000 00:15:00 +0000 (+0000) Subject: (savedir): Work even if directory size is negative; this can X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=977e420a35c2fdbfc220af6223d72eb49e203de8;p=chaz%2Ftar (savedir): Work even if directory size is negative; this can happen with some NFS screwups. --- diff --git a/lib/savedir.c b/lib/savedir.c index 29b3842..e969407 100644 --- a/lib/savedir.c +++ b/lib/savedir.c @@ -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)