[git] GnuPG - branch, master, updated. gnupg-2.1.7-44-g88317ae

by Werner Koch cvs at cvs.gnupg.org
Sun Aug 23 12:23:35 CEST 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  88317ae8c829bfeb1689415efbd32b7a232d7bd0 (commit)
       via  00def10d365a88ce2d034ea9a5d6be4b03285fa4 (commit)
      from  09f2a7bca624d0492e1d7ab29ce19542249c13ff (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 88317ae8c829bfeb1689415efbd32b7a232d7bd0
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Aug 23 12:17:43 2015 +0200

    gpg: Fix regression in packet parser from Aug 19.
    
    * g10/parse-packet.c (parse): Use an int to compare to -1.  Use
    buf32_to_ulong.
    --
    
    Regression-due-to: 0add91ae1ca3718e8140af09294c595f47c958d3
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index edebbe7..4e236cb 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -558,27 +558,20 @@ parse (IOBUF inp, PACKET * pkt, int onlykeypkts, off_t * retpos,
       else if (c == 255)
         {
 	  int i;
-	  int eof = 0;
 	  char value[4];
 
 	  for (i = 0; i < 4; i ++)
-	    if ((value[i] = hdr[hdrlen++] = iobuf_get (inp)) == -1)
-	      {
-		eof = 1;
-		break;
-	      }
-
-	  if (eof)
             {
-              log_error ("%s: 4 byte length invalid\n", iobuf_where (inp));
-              rc = gpg_error (GPG_ERR_INV_PACKET);
-              goto leave;
+              if ((c = iobuf_get (inp)) == -1)
+                {
+                  log_error ("%s: 4 byte length invalid\n", iobuf_where (inp));
+                  rc = gpg_error (GPG_ERR_INV_PACKET);
+                  goto leave;
+                }
+              value[i] = hdr[hdrlen++] = c;
             }
 
-	  pktlen = (((unsigned long) value[0] << 24)
-		    | ((unsigned long) value[1] << 16)
-		    | ((unsigned long) value[2] << 8)
-		    | ((unsigned long) value[3]));
+	  pktlen = buf32_to_ulong (value);
         }
       else /* Partial body length.  */
         {

commit 00def10d365a88ce2d034ea9a5d6be4b03285fa4
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Aug 23 11:56:17 2015 +0200

    gpg: Show not found keys with --locate-key --verbose.
    
    * g10/keylist.c (locate_one): Print a diagnostic for a not-found key.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/keylist.c b/g10/keylist.c
index 0383931..cc92d1a 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -626,6 +626,9 @@ locate_one (ctrl_t ctrl, strlist_t names)
 	{
 	  if (gpg_err_code (rc) != GPG_ERR_NO_PUBKEY)
 	    log_error ("error reading key: %s\n", gpg_strerror (rc));
+          else if (opt.verbose)
+            log_info (_("key \"%s\" not found: %s\n"),
+                      sl->d, gpg_strerror (rc));
 	}
       else
 	{

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

Summary of changes:
 g10/keylist.c      |  3 +++
 g10/parse-packet.c | 23 ++++++++---------------
 2 files changed, 11 insertions(+), 15 deletions(-)


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




More information about the Gnupg-commits mailing list