aboutsummaryrefslogtreecommitdiffstats
path: root/demos/spkigen.c
diff options
context:
space:
mode:
Diffstat (limited to 'demos/spkigen.c')
-rw-r--r--demos/spkigen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/demos/spkigen.c b/demos/spkigen.c
index d87881197c..2cd5dfea97 100644
--- a/demos/spkigen.c
+++ b/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,