summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/demos/spkigen.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/demos/spkigen.c')
-rw-r--r--crypto/openssl/demos/spkigen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/openssl/demos/spkigen.c b/crypto/openssl/demos/spkigen.c
index d878811..2cd5dfe 100644
--- a/crypto/openssl/demos/spkigen.c
+++ b/crypto/openssl/demos/spkigen.c
@@ -65,7 +65,8 @@ char *argv[];
fprintf(stderr,"please enter challenge string:");
fflush(stderr);
- fgets(buf,120,stdin);
+ buf[0]='\0';
+ fgets(buf,sizeof buf,stdin);
i=strlen(buf);
if (i > 0) buf[--i]='\0';
if (!ASN1_STRING_set((ASN1_STRING *)spki->spkac->challenge,
OpenPOWER on IntegriCloud