[git] GnuPG - branch, master, updated. gnupg-2.1.0-50-ge59b1cc

by Werner Koch cvs at cvs.gnupg.org
Fri Nov 28 12:21:03 CET 2014


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  e59b1cc7471dd161a627b290c645ef7bd0d9d42c (commit)
      from  7aee3579be6e24a1aa280e75615fc3a11ceef960 (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 e59b1cc7471dd161a627b290c645ef7bd0d9d42c
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Nov 28 12:20:42 2014 +0100

    gpg: Change another BUG() call to a regular error message.
    
    * g10/mainproc.c (proc_tree): Replace BUG by a proper error messages.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/g10/mainproc.c b/g10/mainproc.c
index d908d57..03a13c5 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -2123,8 +2123,9 @@ proc_tree (CTX c, kbnode_t node)
 
           free_md_filter_context (&c->mfx);
           /* Prepare to create all requested message digests.  */
-          if (gcry_md_open (&c->mfx.md, 0, 0))
-            BUG ();
+          rc = gcry_md_open (&c->mfx.md, 0, 0);
+          if (rc)
+            goto hash_err;
 
           /* Fixme: why looking for the signature packet and not the
              one-pass packet?  */
@@ -2154,6 +2155,7 @@ proc_tree (CTX c, kbnode_t node)
                                               use_textmode);
 	    }
 
+        hash_err:
           if (rc)
             {
               log_error ("can't hash datafile: %s\n", g10_errstr (rc));
@@ -2225,8 +2227,9 @@ proc_tree (CTX c, kbnode_t node)
         {
           /* Detached signature */
           free_md_filter_context (&c->mfx);
-          if (gcry_md_open (&c->mfx.md, sig->digest_algo, 0))
-            BUG ();
+          rc = gcry_md_open (&c->mfx.md, sig->digest_algo, 0);
+          if (rc)
+            goto detached_hash_err;
 
           if (RFC2440 || RFC4880)
             ; /* Strict RFC mode.  */
@@ -2236,8 +2239,9 @@ proc_tree (CTX c, kbnode_t node)
             {
               /* Enable a workaround for a pgp5 bug when the detached
                * signature has been created in textmode.  */
-              if (gcry_md_open (&c->mfx.md2, sig->digest_algo, 0 ))
-                BUG ();
+              rc = gcry_md_open (&c->mfx.md2, sig->digest_algo, 0);
+              if (rc)
+                goto detached_hash_err;
 	    }
 
           /* Here we used to have another hack to work around a pgp
@@ -2276,6 +2280,7 @@ proc_tree (CTX c, kbnode_t node)
                                               (sig->sig_class == 0x01));
 	    }
 
+        detached_hash_err:
           if (rc)
             {
               log_error ("can't hash datafile: %s\n", g10_errstr(rc));

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

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


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




More information about the Gnupg-commits mailing list