[svn] GnuPG - r5261 - trunk/g10

svn author wk cvs at cvs.gnupg.org
Wed Feb 17 11:23:43 CET 2010


Author: wk
Date: 2010-02-17 11:23:42 +0100 (Wed, 17 Feb 2010)
New Revision: 5261

Modified:
   trunk/g10/ChangeLog
   trunk/g10/keygen.c
Log:
Fix bug#1186.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2010-02-12 15:15:34 UTC (rev 5260)
+++ trunk/g10/ChangeLog	2010-02-17 10:23:42 UTC (rev 5261)
@@ -1,3 +1,8 @@
+2010-02-17  Werner Koch  <wk at g10code.com>
+
+	* keygen.c (ask_user_id): Avoid infinite loop in case of invalid
+	data.  Fixes bug#1186.
+
 2010-02-02  Werner Koch  <wk at g10code.com>
 
 	* keyedit.c (keyedit_menu): Change prompt to "gpg".

Modified: trunk/g10/keygen.c
===================================================================
--- trunk/g10/keygen.c	2010-02-12 15:15:34 UTC (rev 5260)
+++ trunk/g10/keygen.c	2010-02-17 10:23:42 UTC (rev 5261)
@@ -2203,7 +2203,7 @@
 	    if( strlen(ansstr) != 10 )
 		BUG();
 	    if( cpr_enabled() ) {
-		answer = xstrdup(ansstr+6);
+                answer = xstrdup (ansstr + (fail?8:6));
 		answer[1] = 0;
 	    }
 	    else {




More information about the Gnupg-commits mailing list