Browse Source

2006-11-23 Marcus Brinkmann <marcus@g10code.de>

	* src/cert-gpgsm.c (search_certs_line): Don't overwrite CERT->uid.
Marcus Brinkmann 18 years ago
parent
commit
8f303b2543
2 changed files with 8 additions and 2 deletions
  1. 4 0
      ChangeLog
  2. 4 2
      src/cert-gpgsm.c

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+2006-11-23  Marcus Brinkmann  <marcus@g10code.de>
+
+	* src/cert-gpgsm.c (search_certs_line): Don't overwrite CERT->uid.
+
 2006-11-21  Marcus Brinkmann  <marcus@g10code.de>
 
 	* src/cert-gpgsm.c (search_certs_line): Fix off-by-one error.

+ 4 - 2
src/cert-gpgsm.c

@@ -378,8 +378,10 @@ search_certs_line (struct search_ctx *ctx)
     case RT_UID:
       if (cert->valid)
 	{
-	  /* Field 2 has the trust info, and field 10 has the user ID.  */
-	  if (fields >= 10)
+	  /* Field 2 has the trust info, and field 10 has the user ID.
+	     Note that more than one UID field can appear.  We only
+	     remember the last one.  It's not used anyway.  */
+	  if (fields >= 10 && !cert->uid)
 	    {
 	      if (decode_c_string (field[9], &cert->uid, 0))
 		return gpg_error (GPG_ERR_ENOMEM);	/* FIXME */