[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.2.3-15-gf8e7524

by Andre Heinecke cvs at cvs.gnupg.org
Tue Mar 17 13:45:18 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 "GnuPG for Windows".

The branch, master has been updated
       via  f8e7524a67c2fd1f022a3c835aad9b5cddb70752 (commit)
      from  882482fa82a8f861ab8930616e8bbf994cb631c4 (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 f8e7524a67c2fd1f022a3c835aad9b5cddb70752
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Mar 17 12:16:34 2015 +0100

    Add patch to fix issue1926
    
    * Makefile.am (EXTRA_DIST): Add patch.
    * patches/gnupg2-2.0.27/
      0003-gpgtar-Fix-extracting-files-with-size-512.patch: New.
    * NEWS: Mention this.

diff --git a/Makefile.am b/Makefile.am
index affba94..8a4026b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,7 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         patches/glib-2.41.0/03-remove-rand_s.patch \
         patches/gnupg2-2.0.27/0001-Enable-wildcard-expansion-with-mingw-w64.patch \
         patches/gnupg2-2.0.27/0002-Let-wchar_to_native-convert-to-console-codepage.patch \
+        patches/gnupg2-2.0.27/0003-gpgtar-Fix-extracting-files-with-size-512.patch \
         patches/gnupg2-2.0.27/0005-Fix-gpgtar-8-bit-encoding-handling-on-Win32.patch \
         patches/gnupg2/01-version.patch \
         patches/gnupg2/01-version.patch.in \
diff --git a/NEWS b/NEWS
index c7ff35e..dc10d55 100644
--- a/NEWS
+++ b/NEWS
@@ -16,6 +16,12 @@ Noteworthy changes in version 2.2.4 (unreleased)
 (de) Libgcrypt wurde auf Version 1.6.3 aktualisiert (enthält den
      fix für CVE-2014-3591)
 
+(en) An issue has been fixed which could cause extracted files from
+     TAR Archives to be truncated.
+
+(de) Ein Problem wurde behoben durch welches Ausgabedateien beim
+     extrahieren von TAR Archiven beschädigt wurden.
+
 ~~~~~~~~~~~~~~~
 GnuPG:          2.0.27
 Kleopatra:      2.2.0-git945878c
diff --git a/patches/gnupg2-2.0.27/0003-gpgtar-Fix-extracting-files-with-size-512.patch b/patches/gnupg2-2.0.27/0003-gpgtar-Fix-extracting-files-with-size-512.patch
new file mode 100755
index 0000000..ddde7df
--- /dev/null
+++ b/patches/gnupg2-2.0.27/0003-gpgtar-Fix-extracting-files-with-size-512.patch
@@ -0,0 +1,47 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From 0ed2cfcf054e286b238d4ddbbb3e929482849a47 Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke at intevation.de>
+Date: Tue, 17 Mar 2015 10:48:09 +0100
+Subject: [PATCH 1/4] 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)
+---
+ tools/gpgtar-extract.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+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)
+         {
+--
+1.9.1

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

Summary of changes:
 Makefile.am                                        |  1 +
 NEWS                                               |  6 +++
 ...gpgtar-Fix-extracting-files-with-size-512.patch | 47 ++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100755 patches/gnupg2-2.0.27/0003-gpgtar-Fix-extracting-files-with-size-512.patch


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list