[svn] GnuPG - r5264 - branches/STABLE-BRANCH-1-4/g10

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


Author: wk
Date: 2010-02-17 11:28:27 +0100 (Wed, 17 Feb 2010)
New Revision: 5264

Modified:
   branches/STABLE-BRANCH-1-4/g10/ChangeLog
   branches/STABLE-BRANCH-1-4/g10/keygen.c
Log:
Fix bug 1186


Modified: branches/STABLE-BRANCH-1-4/g10/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/ChangeLog	2010-02-17 10:26:54 UTC (rev 5263)
+++ branches/STABLE-BRANCH-1-4/g10/ChangeLog	2010-02-17 10:28:27 UTC (rev 5264)
@@ -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>
 
 	* card-util.c (card_edit): Change prompt to "gpg/card".

Modified: branches/STABLE-BRANCH-1-4/g10/keygen.c
===================================================================
--- branches/STABLE-BRANCH-1-4/g10/keygen.c	2010-02-17 10:26:54 UTC (rev 5263)
+++ branches/STABLE-BRANCH-1-4/g10/keygen.c	2010-02-17 10:28:27 UTC (rev 5264)
@@ -1927,7 +1927,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