diff options
author | Jeremy Allison <jra@samba.org> | 2000-11-22 23:06:29 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-11-22 23:06:29 +0000 |
commit | cf05709ec394d6cac14577c033d658bdc4506208 (patch) | |
tree | 1ee11966ea23ef53dfa0e4d8cc1fd565b1ccb195 /source/client/clitar.c | |
parent | 37a665002c5cd7908c13d306f61af272a899dbc8 (diff) | |
download | samba-cf05709ec394d6cac14577c033d658bdc4506208.tar.gz samba-cf05709ec394d6cac14577c033d658bdc4506208.tar.xz samba-cf05709ec394d6cac14577c033d658bdc4506208.zip |
Tar fixes from Craig Barratt craig@arraycomm.com.
Jeremy.
Diffstat (limited to 'source/client/clitar.c')
-rw-r--r-- | source/client/clitar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/client/clitar.c b/source/client/clitar.c index efa4fa8815e..fe0fc83e4cb 100644 --- a/source/client/clitar.c +++ b/source/client/clitar.c @@ -181,7 +181,7 @@ static void writetarheader(int f, char *aname, int size, time_t mtime, memset(hb.dummy, 0, sizeof(hb.dummy)); l=strlen(aname); - if (l >= NAMSIZ) { + if (l >= NAMSIZ - 1) { /* write a GNU tar style long header */ char *b; b = (char *)malloc(l+TBLOCK+100); @@ -189,7 +189,7 @@ static void writetarheader(int f, char *aname, int size, time_t mtime, DEBUG(0,("out of memory\n")); exit(1); } - writetarheader(f, "/./@LongLink", l+1, 0, " 0 \0", 'L'); + writetarheader(f, "/./@LongLink", l+2, 0, " 0 \0", 'L'); memset(b, 0, l+TBLOCK+100); fixtarname(b, aname, l); i = strlen(b)+1; |