diff options
Diffstat (limited to 'src/lib/libcrypto/ui')
-rw-r--r-- | src/lib/libcrypto/ui/Makefile.ssl | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/ui/ui_openssl.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/ui/ui_util.c | 7 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ui/Makefile.ssl b/src/lib/libcrypto/ui/Makefile.ssl index 7de1d0022b..57b2e38335 100644 --- a/src/lib/libcrypto/ui/Makefile.ssl +++ b/src/lib/libcrypto/ui/Makefile.ssl | |||
@@ -72,7 +72,7 @@ lint: | |||
72 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 72 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
73 | 73 | ||
74 | depend: | 74 | depend: |
75 | $(MAKEDEPEND) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) | 75 | $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) |
76 | 76 | ||
77 | dclean: | 77 | dclean: |
78 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | 78 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new |
diff --git a/src/lib/libcrypto/ui/ui_openssl.c b/src/lib/libcrypto/ui/ui_openssl.c index 821dd29eaa..f47ed31cb0 100644 --- a/src/lib/libcrypto/ui/ui_openssl.c +++ b/src/lib/libcrypto/ui/ui_openssl.c | |||
@@ -269,7 +269,7 @@ static long tty_orig[3], tty_new[3]; /* XXX Is there any guarantee that this w | |||
269 | static long status; | 269 | static long status; |
270 | static unsigned short channel = 0; | 270 | static unsigned short channel = 0; |
271 | #else | 271 | #else |
272 | #ifndef OPENSSL_SYS_MSDOS | 272 | #if !defined(OPENSSL_SYS_MSDOS) || defined(__DJGPP__) |
273 | static TTY_STRUCT tty_orig,tty_new; | 273 | static TTY_STRUCT tty_orig,tty_new; |
274 | #endif | 274 | #endif |
275 | #endif | 275 | #endif |
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); |