diff options
author | markus <> | 2002-09-10 16:31:57 +0000 |
---|---|---|
committer | markus <> | 2002-09-10 16:31:57 +0000 |
commit | 7d038e9d4d83e7c7120e78418e108df70b9025d6 (patch) | |
tree | baf775b286ff801a89f746b1938a3c700bba6822 /src/lib/libcrypto/ui/ui_util.c | |
parent | 3bd21dd4c3a3e3106321a5f6b3641ab9f18a6e3b (diff) | |
download | openbsd-7d038e9d4d83e7c7120e78418e108df70b9025d6.tar.gz openbsd-7d038e9d4d83e7c7120e78418e108df70b9025d6.tar.bz2 openbsd-7d038e9d4d83e7c7120e78418e108df70b9025d6.zip |
merge openssl-0.9.7-beta3, tested on vax by miod@
Diffstat (limited to 'src/lib/libcrypto/ui/ui_util.c')
-rw-r--r-- | src/lib/libcrypto/ui/ui_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ui/ui_util.c b/src/lib/libcrypto/ui/ui_util.c index 7c6f7d3a73..f05573df33 100644 --- a/src/lib/libcrypto/ui/ui_util.c +++ b/src/lib/libcrypto/ui/ui_util.c | |||
@@ -71,12 +71,15 @@ int UI_UTIL_read_pw(char *buf,char *buff,int size,const char *prompt,int verify) | |||
71 | int ok = 0; | 71 | int ok = 0; |
72 | UI *ui; | 72 | UI *ui; |
73 | 73 | ||
74 | if (size < 1) | ||
75 | return -1; | ||
76 | |||
74 | ui = UI_new(); | 77 | ui = UI_new(); |
75 | if (ui) | 78 | if (ui) |
76 | { | 79 | { |
77 | ok = UI_add_input_string(ui,prompt,0,buf,0,BUFSIZ-1); | 80 | ok = UI_add_input_string(ui,prompt,0,buf,0,size-1); |
78 | if (ok == 0 && verify) | 81 | if (ok == 0 && verify) |
79 | ok = UI_add_verify_string(ui,prompt,0,buff,0,BUFSIZ-1, | 82 | ok = UI_add_verify_string(ui,prompt,0,buff,0,size-1, |
80 | buf); | 83 | buf); |
81 | if (ok == 0) | 84 | if (ok == 0) |
82 | ok=UI_process(ui); | 85 | ok=UI_process(ui); |