[git] GnuPG - branch, master, updated. gnupg-2.1.9-209-g28195f8

by Neal H. Walfield cvs at cvs.gnupg.org
Wed Dec 2 15:22:04 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 "The GNU Privacy Guard".

The branch, master has been updated
       via  28195f8d27aa0fc9daf5b74fb24de87c36e04739 (commit)
       via  c73d75103cbd34975e2bd28e9924caee05eaf829 (commit)
      from  28e2513721ff0cec920564d4087f3600cce8672e (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 28195f8d27aa0fc9daf5b74fb24de87c36e04739
Author: Neal H. Walfield <neal at g10code.com>
Date:   Wed Dec 2 15:21:20 2015 +0100

    gpg: Improve documentation.
    
    * g10/tofu.c (initdb): Improve documentation.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>

diff --git a/g10/tofu.c b/g10/tofu.c
index 2433b7b..b7f61e9 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -563,8 +563,7 @@ initdb (sqlite3 *db, enum db_type type)
 
        TIME: The time this binding was first observed.
 
-       POLICY: The trust policy (-1, 0, 1, or 2; see the
-         documentation for TOFU_POLICY_BAD, etc. above).
+       POLICY: The trust policy (TOFU_POLICY_BAD, etc. as an integer).
 
        CONFLICT is either NULL or a fingerprint.  Assume that we have
          a binding <0xdeadbeef, foo at example.com> and then we observe

commit c73d75103cbd34975e2bd28e9924caee05eaf829
Author: Neal H. Walfield <neal at g10code.com>
Date:   Wed Dec 2 15:20:18 2015 +0100

    gpg: Fix type mismatch resulting in a buffer overflow.
    
    * g10/tofu.c (record_binding): Change policy_old's type from an enum
    tofu_policy to a long: this variable is passed by reference and a long
    is expected.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
    Reported-by: Justus Winter <justus at g10code.com>
    Fixes-commit: f77913e

diff --git a/g10/tofu.c b/g10/tofu.c
index d340bfe..2433b7b 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -1079,7 +1079,10 @@ record_binding (struct dbs *dbs, const char *fingerprint, const char *email,
   struct db *db_email = NULL, *db_key = NULL;
   int rc;
   char *err = NULL;
-  enum tofu_policy policy_old = TOFU_POLICY_NONE;
+  /* policy_old needs to be a long and not an enum tofu_policy,
+     because we pass it by reference to get_single_long_cb2, which
+     expects a long.  */
+  long policy_old = TOFU_POLICY_NONE;
 
   if (! (policy == TOFU_POLICY_AUTO
 	 || policy == TOFU_POLICY_GOOD

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

Summary of changes:
 g10/tofu.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


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




More information about the Gnupg-commits mailing list