]> Dogcows Code - chaz/tar/blobdiff - src/incremen.c
Bugfix.
[chaz/tar] / src / incremen.c
index 59be617b0d7c0dfe3bbb1d3d08ebd1853d2f20db..0d0b4ff498818409e056f1ed134afe2014f1f3d0 100644 (file)
@@ -258,7 +258,7 @@ make_directory (const char *name, char *caname)
   directory->dump = directory->idump = NULL;
   directory->orig = NULL;
   directory->flags = false;
-  if (namelen && ISSLASH (name[namelen - 1]))
+  if (namelen > 1 && ISSLASH (name[namelen - 1]))
     namelen--;
   directory->name = xmalloc (namelen + 1);
   memcpy (directory->name, name, namelen);
@@ -922,8 +922,8 @@ read_incr_db_01 (int version, const char *initbuf)
   uintmax_t u;
   time_t sec;
   long int nsec;
-  char *buf = 0;
-  size_t bufsize;
+  char *buf = NULL;
+  size_t bufsize = 0;
   char *ebuf;
   long lineno = 1;
 
@@ -1282,8 +1282,8 @@ void
 read_directory_file (void)
 {
   int fd;
-  char *buf = 0;
-  size_t bufsize;
+  char *buf = NULL;
+  size_t bufsize = 0;
   int flags = O_RDWR | O_CREAT;
 
   if (incremental_level == 0)
@@ -1410,7 +1410,7 @@ write_directory_file (void)
   if (! fp)
     return;
 
-  if (fseek (fp, 0L, SEEK_SET) != 0)
+  if (fseeko (fp, 0L, SEEK_SET) != 0)
     seek_error (listed_incremental_option);
   if (sys_truncate (fileno (fp)) != 0)
     truncate_error (listed_incremental_option);
This page took 0.021614 seconds and 4 git commands to generate.