[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.27-5-g0ed2cfc

by Andre Heinecke cvs at cvs.gnupg.org
Tue Mar 17 12:05:01 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, STABLE-BRANCH-2-0 has been updated
       via  0ed2cfcf054e286b238d4ddbbb3e929482849a47 (commit)
      from  25e2b27b0027af9c1ce0cae0cd549c09ed349811 (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 0ed2cfcf054e286b238d4ddbbb3e929482849a47
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>
    (cherry picked from commit 6cbbb0bec98e1acefc4c7163cc41a507469db920)

diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c
index 736c7fc..b0d31e0 100644
--- a/tools/gpgtar-extract.c
+++ b/tools/gpgtar-extract.c
@@ -73,7 +73,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