gpgtar: Fix extracting files with !(size % 512)
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 17 Mar 2015 09:48:09 +0000 (10:48 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 17 Mar 2015 10:55:22 +0000 (11:55 +0100)
commit6cbbb0bec98e1acefc4c7163cc41a507469db920
tree72af423253180a75d9d60e85ff818a603f79a68f
parent9078b75a73600fc6b7b5502ceee8de032bb9c446
gpgtar: Fix extracting files with !(size % 512)

* tools/gpgtar-extract.c (extract_regular): Handle size multiples
  of RECORDSIZE.

--
  If a hdr->size was a multiple of 512 the last record would
  not have been written and the files corrupted accordingly.

GnuPG-bug-id: 1926

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
Changed to use only if-else.

Signed-off-by: Werner Koch <wk@gnupg.org>
tools/gpgtar-extract.c