Fix for crash bug with amanda - from "Michael C. Povel" <Michael.Povel@hub.de>.
authorJeremy Allison <jra@samba.org>
Fri, 13 Feb 1998 12:40:23 +0000 (12:40 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 13 Feb 1998 12:40:23 +0000 (12:40 +0000)
Jeremy.
(This used to be commit 735adfa01b7b2e540bb5476a77d6b689ca70852a)

source3/client/clitar.c

index 6763d221cea68e1f16afd23e0206aab2a9910703..6a811f41c7db012806003b048f2c48a1c82e5a3a 100644 (file)
@@ -111,7 +111,7 @@ static void writetarheader(int f,  char *aname, int size, time_t mtime,
          memset(b, 0, l+TBLOCK+100);
          fixtarname(b, aname, l+1);
          i = strlen(b)+1;
-         dotarbuf(f, b, TBLOCK*((i+(TBLOCK-1)/TBLOCK)));
+         dotarbuf(f, b, TBLOCK*(((i-1)/TBLOCK)+1));
          free(b);
   }