Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!tds.kth.se!juha From: juha@tds.kth.se (Juha Sarlin) Newsgroups: gnu.utils.bug Subject: tar 1.07 bugfix for compressed archives Message-ID: <8907271921.AA03538@ttds.tds.kth.se> Date: 27 Jul 89 21:21:07 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 33 GNU Tar 1.07 tries to zero the unused part of the last block when -z (compress) option is used, but misses slightly; some other part of the block gets zeroed instead. Also, it seems to be an undocumented "feature" that a single -z doesn't pad the last block to blocksize, but two does. Repeat by something like: tar -cvzz -f /dev/rst8 -b 200 * And here is my fix: *** /tmp/,RCSt1a00327 Thu Jul 27 20:29:49 1989 --- buffer.c Thu Jul 27 20:35:25 1989 *************** *** 419,425 **** if(f_compress<2) blocksize-=n; else ! bzero(ar_block->charptr+n,blocksize-n); err=rmtwrite(archive,ar_block->charptr,blocksize); if(err!=(blocksize)) writeerror(err); --- 419,425 ---- if(f_compress<2) blocksize-=n; else ! bzero(ar_block->charptr+blocksize-n,n); err=rmtwrite(archive,ar_block->charptr,blocksize); if(err!=(blocksize)) writeerror(err); -- Juha Sarlin juha@tds.kth.se