[Pkg-gnupg-commit] [gnupg2] 01/02: more bugfix patches from upstream

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Apr 6 15:31:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 4672da33cb770852b47dc80e7d6c753974362a16
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Thu Apr 6 11:21:04 2017 -0400

    more bugfix patches from upstream
---
 .../patches/0018-tests-Make-test-more-robust.patch | 43 ++++++++++++++++++++++
 ...gpgscm-Initialize-unused-slots-in-vectors.patch | 42 +++++++++++++++++++++
 .../0020-gpgscm-Avoid-mutating-integer.patch       | 27 ++++++++++++++
 debian/patches/series                              |  3 ++
 4 files changed, 115 insertions(+)

diff --git a/debian/patches/0018-tests-Make-test-more-robust.patch b/debian/patches/0018-tests-Make-test-more-robust.patch
new file mode 100644
index 0000000..d6d5e2d
--- /dev/null
+++ b/debian/patches/0018-tests-Make-test-more-robust.patch
@@ -0,0 +1,43 @@
+From: Justus Winter <justus at g10code.com>
+Date: Thu, 6 Apr 2017 12:33:37 +0200
+Subject: tests: Make test more robust.
+
+* tests/openpgp/4gb-packet.scm: Skip if we do not have BZIP2.
+* tests/openpgp/defs.scm (have-compression-algo?): New function.
+
+GnuPG-bug-id: 3028
+Signed-off-by: Justus Winter <justus at g10code.com>
+(cherry picked from commit 94645311f8a3e9ae33643512f87fbef41bf0556f)
+---
+ tests/openpgp/4gb-packet.scm | 7 ++++---
+ tests/openpgp/defs.scm       | 2 ++
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/tests/openpgp/4gb-packet.scm b/tests/openpgp/4gb-packet.scm
+index b827181..109e61d 100755
+--- a/tests/openpgp/4gb-packet.scm
++++ b/tests/openpgp/4gb-packet.scm
+@@ -23,6 +23,7 @@
+ (load (with-path "defs.scm"))
+ (setup-environment)
+ 
+-(if (= 0 (call `(, at GPG --list-packets ,(in-srcdir "4gb-packet.asc"))))
+-  (info "Can parse 4GB packets.")
+-  (fail "Failed to parse 4GB packet."))
++(unless (have-compression-algo? "BZIP2")
++	(skip "BZIP2 support not compiled in."))
++
++(call-check `(, at GPG --list-packets ,(in-srcdir "4gb-packet.asc")))
+diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
+index 815a560..29eb775 100644
+--- a/tests/openpgp/defs.scm
++++ b/tests/openpgp/defs.scm
+@@ -258,6 +258,8 @@
+   (not (not (member x (force all-hash-algos)))))
+ (define (have-cipher-algo? x)
+   (not (not (member x (force all-cipher-algos)))))
++(define (have-compression-algo? x)
++  (not (not (member x (force all-compression-algos)))))
+ 
+ (define (gpg-pipe args0 args1 errfd)
+   (lambda (source sink)
diff --git a/debian/patches/0019-gpgscm-Initialize-unused-slots-in-vectors.patch b/debian/patches/0019-gpgscm-Initialize-unused-slots-in-vectors.patch
new file mode 100644
index 0000000..94e6c19
--- /dev/null
+++ b/debian/patches/0019-gpgscm-Initialize-unused-slots-in-vectors.patch
@@ -0,0 +1,42 @@
+From: Justus Winter <justus at g10code.com>
+Date: Thu, 6 Apr 2017 16:21:48 +0200
+Subject: gpgscm: Initialize unused slots in vectors.
+
+* tests/gpgscm/scheme.c (get_vector_object): Initialize unused slots
+at the end of vectors.
+--
+
+They should not be used for anything, but let's just initialize them
+to something benign to be sure.
+
+GnuPG-bug-id: 3014
+Signed-off-by: Justus Winter <justus at g10code.com>
+(cherry picked from commit b83903f59ec5d49ac579f263da70ebc8dc3645b5)
+---
+ tests/gpgscm/scheme.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
+index 51fdef0..3719e53 100644
+--- a/tests/gpgscm/scheme.c
++++ b/tests/gpgscm/scheme.c
+@@ -1083,11 +1083,19 @@ static pointer get_cell(scheme *sc, pointer a, pointer b)
+ static pointer get_vector_object(scheme *sc, int len, pointer init)
+ {
+   pointer cells = get_consecutive_cells(sc, vector_size(len));
++  int i;
++  int alloc_len = 1 + 3 * (vector_size(len) - 1);
+   if(sc->no_memory) { return sc->sink; }
+   /* Record it as a vector so that gc understands it. */
+   typeflag(cells) = (T_VECTOR | T_ATOM | T_FINALIZE);
+   vector_length(cells) = len;
+   fill_vector(cells,init);
++
++  /* Initialize the unused slots at the end.  */
++  assert (alloc_len - len < 3);
++  for (i = len; i < alloc_len; i++)
++    cells->_object._vector._elements[i] = sc->NIL;
++
+   if (gc_enabled (sc))
+     push_recent_alloc(sc, cells, sc->NIL);
+   return cells;
diff --git a/debian/patches/0020-gpgscm-Avoid-mutating-integer.patch b/debian/patches/0020-gpgscm-Avoid-mutating-integer.patch
new file mode 100644
index 0000000..9a75baf
--- /dev/null
+++ b/debian/patches/0020-gpgscm-Avoid-mutating-integer.patch
@@ -0,0 +1,27 @@
+From: Justus Winter <justus at g10code.com>
+Date: Thu, 6 Apr 2017 16:24:49 +0200
+Subject: gpgscm: Avoid mutating integer.
+
+* tests/gpgscm/scheme.c (opexe_5): Do not modify the integer in-place
+while printing an vector.  Integer objects may be shared, so they must
+not be mutated.
+
+Signed-off-by: Justus Winter <justus at g10code.com>
+(cherry picked from commit f1dc34f502a68673e7a29f3fcf57b8dc6a4fac89)
+---
+ tests/gpgscm/scheme.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
+index 3719e53..aa0cf69 100644
+--- a/tests/gpgscm/scheme.c
++++ b/tests/gpgscm/scheme.c
+@@ -5181,7 +5181,7 @@ static pointer opexe_5(scheme *sc, enum scheme_opcodes op) {
+                s_return(sc,sc->T);
+           } else {
+                pointer elem=vector_elem(vec,i);
+-               ivalue_unchecked(cdr(sc->args))=i+1;
++               cdr(sc->args) = mk_integer(sc, i + 1);
+                s_save(sc,OP_PVECFROM, sc->args, sc->NIL);
+                sc->args=elem;
+                if (i > 0)
diff --git a/debian/patches/series b/debian/patches/series
index e30e4f1..f9ca2a8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,3 +15,6 @@ gpg-agent-idling/0011-agent-Avoid-scheduled-checks-on-socket-when-inotify-.patch
 0015-gpgscm-Fix-copying-values.patch
 0016-tests-Fix-setup-of-ephemeral-home-directories.patch
 0017-tests-Fix-setup-of-ephemeral-home-directories.patch
+0018-tests-Make-test-more-robust.patch
+0019-gpgscm-Initialize-unused-slots-in-vectors.patch
+0020-gpgscm-Avoid-mutating-integer.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list