summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2014-04-04 12:44:43 +0100
committerDr. Stephen Henson <steve@openssl.org>2014-04-04 13:07:17 +0100
commitf54167d1dcfb0dac8172c48c9dc0f9af4ece3ec1 (patch)
tree5e231898b66355b73e3ab0be687a0bd83eb130e8
parent6042582b624bcabbfd33677372aa04b9413ace67 (diff)
downloadopenssl-new-f54167d1dcfb0dac8172c48c9dc0f9af4ece3ec1.tar.gz
Use correct length when prompting for password.
Use bufsiz - 1 not BUFSIZ - 1 when prompting for a password in the openssl utility. Thanks to Rob Mackinnon, Leviathan Security for reporting this issue. (cherry picked from commit 7ba08a4d73c1bdfd3aced09a628b1d7d7747cdca)
-rw-r--r--apps/apps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 8a6a9a29a7..b76db10a5e 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -586,12 +586,12 @@ int password_callback(char *buf, int bufsiz, int verify,
if (ok >= 0)
ok = UI_add_input_string(ui,prompt,ui_flags,buf,
- PW_MIN_LENGTH,BUFSIZ-1);
+ PW_MIN_LENGTH,bufsiz-1);
if (ok >= 0 && verify)
{
buff = (char *)OPENSSL_malloc(bufsiz);
ok = UI_add_verify_string(ui,prompt,ui_flags,buff,
- PW_MIN_LENGTH,BUFSIZ-1, buf);
+ PW_MIN_LENGTH,bufsiz-1, buf);
}
if (ok >= 0)
do