Index: b/tools/gpgtar-extract.c =================================================================== --- b/tools/gpgtar-extract.c +++ b/tools/gpgtar-extract.c @@ -67,6 +67,11 @@ goto leave; n++; nbytes = (n < hdr->nrecords)? RECORDSIZE : (hdr->size % RECORDSIZE); + if (hdr->size && hdr->size % RECORDSIZE == 0) + { + /* The last record is RECORDSIZE bytes long. */ + nbytes = RECORDSIZE; + } nwritten = es_fwrite (record, 1, nbytes, outfp); if (nwritten != nbytes) {