]> Dogcows Code - chaz/tar/commitdiff
(savedir): Work even if directory size is negative; this can
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Feb 2000 00:15:00 +0000 (00:15 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Feb 2000 00:15:00 +0000 (00:15 +0000)
happen with some NFS screwups.

lib/savedir.c

index 29b3842c04022bd00276b07cbf45b2c9febc6617..e969407d32ee2b9a06fff5ba60bf6b4d41e2a934 100644 (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)
This page took 0.025023 seconds and 4 git commands to generate.