[git] GnuPG - branch, master, updated. gnupg-2.1.2-41-g6cbbb0b

by Andre Heinecke cvs at cvs.gnupg.org
Tue Mar 17 12:03:50 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  6cbbb0bec98e1acefc4c7163cc41a507469db920 (commit)
      from  9078b75a73600fc6b7b5502ceee8de032bb9c446 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6cbbb0bec98e1acefc4c7163cc41a507469db920
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Mar 17 10:48:09 2015 +0100

    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 at intevation.de>
    
    Changed to use only if-else.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c
index 1ea3597..6e506d9 100644
--- a/tools/gpgtar-extract.c
+++ b/tools/gpgtar-extract.c
@@ -66,7 +66,11 @@ extract_regular (estream_t stream, const char *dirname,
       if (err)
         goto leave;
       n++;
-      nbytes = (n < hdr->nrecords)? RECORDSIZE : (hdr->size % RECORDSIZE);
+      if (n < hdr->nrecords || (hdr->size && !(hdr->size % RECORDSIZE)))
+        nbytes = RECORDSIZE;
+      else
+        nbytes = (hdr->size % RECORDSIZE);
+
       nwritten = es_fwrite (record, 1, nbytes, outfp);
       if (nwritten != nbytes)
         {

-----------------------------------------------------------------------

Summary of changes:
 tools/gpgtar-extract.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list