[git] GnuPG - branch, master, updated. gnupg-2.1.19-12-g5f6f3f5

by Werner Koch cvs at cvs.gnupg.org
Fri Mar 3 09:53:31 CET 2017


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  5f6f3f5cae8a95ed469129f9677782c17951dab3 (commit)
      from  1813f3be23bdab5a42070424c47cb8daa9d9e6b7 (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 5f6f3f5cae8a95ed469129f9677782c17951dab3
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Mar 3 09:50:40 2017 +0100

    gpg: Fix possible segv when attribute packets are filtered.
    
    * g10/import.c (impex_filter_getval): Handle PKT_ATTRIBUTE the same as
    PKT_USER_ID
    (apply_drop_sig_filter): Ditto.
    --
    
    The old code was plainly wrong in that it considered PKT_ATTRIBUTE to
    use a PKT_signature object.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/import.c b/g10/import.c
index 9fd16c8..6383d70 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1173,7 +1173,8 @@ impex_filter_getval (void *cookie, const char *propname)
   static char numbuf[20];
   const char *result;
 
-  if (node->pkt->pkttype == PKT_USER_ID)
+  if (node->pkt->pkttype == PKT_USER_ID
+      || node->pkt->pkttype == PKT_ATTRIBUTE)
     {
       PKT_user_id *uid = node->pkt->pkt.user_id;
 
@@ -1202,8 +1203,7 @@ impex_filter_getval (void *cookie, const char *propname)
       else
         result = NULL;
     }
-  else if (node->pkt->pkttype == PKT_SIGNATURE
-           || node->pkt->pkttype == PKT_ATTRIBUTE)
+  else if (node->pkt->pkttype == PKT_SIGNATURE)
     {
       PKT_signature *sig = node->pkt->pkt.signature;
 
@@ -1340,12 +1340,12 @@ apply_drop_sig_filter (kbnode_t keyblock, recsel_expr_t selector)
       if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY
           || node->pkt->pkttype == PKT_SECRET_SUBKEY)
         break; /* ready.  */
-      if (node->pkt->pkttype == PKT_USER_ID)
+      if (node->pkt->pkttype == PKT_USER_ID
+          || node->pkt->pkttype == PKT_ATTRIBUTE)
         active = 1;
       if (!active)
         continue;
-      if (node->pkt->pkttype != PKT_SIGNATURE
-          && node->pkt->pkttype != PKT_ATTRIBUTE)
+      if (node->pkt->pkttype != PKT_SIGNATURE)
         continue;
 
       sig = node->pkt->pkt.signature;

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

Summary of changes:
 g10/import.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


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




More information about the Gnupg-commits mailing list