gpg: Fix "Fix key generation with only an email part".
authorWerner Koch <wk@gnupg.org>
Tue, 12 Sep 2017 12:38:44 +0000 (14:38 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 12 Sep 2017 12:38:44 +0000 (14:38 +0200)
* g10/keygen.c (proc_parameter_file): Don't check the result of
stpcpy.
--

Fixes-commit: 7089dcc54099a4909ce7d386c07ab87e1398e2eb
Signed-off-by: Werner Koch <wk@gnupg.org>
g10/keygen.c

index 08bc621..2b17a1e 100644 (file)
@@ -3533,7 +3533,7 @@ proc_parameter_file (ctrl_t ctrl, struct para_data_s *para, const char *fname,
             {
               /* If we have only the email part, do not add the space
                * and the angle brackets.  */
             {
               /* If we have only the email part, do not add the space
                * and the angle brackets.  */
-              if (*p)
+              if (*r->u.value)
                 p = stpcpy(stpcpy(stpcpy(p," <"), s3 ),">");
               else
                 p = stpcpy (p, s3);
                 p = stpcpy(stpcpy(stpcpy(p," <"), s3 ),">");
               else
                 p = stpcpy (p, s3);