[Gpg4win-commits] r1290 - trunk/patches/gnupg2-2.0.12

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 28 09:54:46 CEST 2009


Author: werner
Date: 2009-09-28 09:54:46 +0200 (Mon, 28 Sep 2009)
New Revision: 1290

Added:
   trunk/patches/gnupg2-2.0.12/11-photoid-sk.patch
Log:
Add minor fix.


Added: trunk/patches/gnupg2-2.0.12/11-photoid-sk.patch
===================================================================
--- trunk/patches/gnupg2-2.0.12/11-photoid-sk.patch	2009-09-28 07:43:36 UTC (rev 1289)
+++ trunk/patches/gnupg2-2.0.12/11-photoid-sk.patch	2009-09-28 07:54:46 UTC (rev 1290)
@@ -0,0 +1,51 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+[g10]
+2009-09-28  Werner Koch  <wk at g10code.com>
+
+       * trustdb.c (get_validity_info): Take care of a NULL PK.  Fixes
+       bug#1138.
+       (get_validity_string): Ditto.
+
+
+
+Index: g10/trustdb.c
+===================================================================
+--- g10/trustdb.c       (revision 5159)
++++ g10/trustdb.c       (working copy)
+@@ -1176,12 +1176,15 @@
+ int
+ get_validity_info (PKT_public_key *pk, PKT_user_id *uid)
+ {
+-    int trustlevel;
+-
+-    trustlevel = get_validity (pk, uid);
+-    if( trustlevel & TRUST_FLAG_REVOKED )
+-       return 'r';
+-    return trust_letter ( trustlevel );
++  int trustlevel;
++  
++  if (!pk)
++    return '?';  /* Just in case a NULL PK is passed.  */
++  
++  trustlevel = get_validity (pk, uid);
++  if ( (trustlevel & TRUST_FLAG_REVOKED) )
++    return 'r';
++  return trust_letter (trustlevel);
+ }
+ 
+ const char *
+@@ -1189,6 +1192,9 @@
+ {
+   int trustlevel;
+ 
++  if (!pk)
++    return "err";  /* Just in case a NULL PK is passed.  */
++
+   trustlevel = get_validity (pk, uid);
+   if( trustlevel & TRUST_FLAG_REVOKED )
+     return _("revoked");
+
+


Property changes on: trunk/patches/gnupg2-2.0.12/11-photoid-sk.patch
___________________________________________________________________
Name: svn:executable
   + *



More information about the Gpg4win-commits mailing list