Fix bug#1186
authorWerner Koch <wk@gnupg.org>
Wed, 17 Feb 2010 10:26:32 +0000 (10:26 +0000)
committerWerner Koch <wk@gnupg.org>
Wed, 17 Feb 2010 10:26:32 +0000 (10:26 +0000)
g10/keygen.c

index 22e56de..7b8a6cb 100644 (file)
@@ -2203,7 +2203,7 @@ ask_user_id (int mode, KBNODE keyblock)
            if( strlen(ansstr) != 10 )
                BUG();
            if( cpr_enabled() ) {
-               answer = xstrdup(ansstr+6);
+                answer = xstrdup (ansstr + (fail?8:6));
                answer[1] = 0;
            }
            else {