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 11:03:36 +0000 (12:03 +0100)
commit0ed2cfcf054e286b238d4ddbbb3e929482849a47
treef4fabc90e557fb3aad157788adc6038db0a707fe
parent25e2b27b0027af9c1ce0cae0cd549c09ed349811
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>
(cherry picked from commit 6cbbb0bec98e1acefc4c7163cc41a507469db920)
tools/gpgtar-extract.c