From f724508902350194053960ec052c2a11df6cc307 Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Wed, 13 May 2015 10:57:40 +0200 Subject: [PATCH] Bump password size to 256 chars --- libdevcore/CommonIO.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libdevcore/CommonIO.cpp b/libdevcore/CommonIO.cpp index 10c53ddb9..d37f74db2 100644 --- a/libdevcore/CommonIO.cpp +++ b/libdevcore/CommonIO.cpp @@ -131,7 +131,7 @@ std::string dev::getPassword(std::string const& _prompt) #else struct termios oflags; struct termios nflags; - char password[128]; + char password[256]; // disable echo in the terminal tcgetattr(fileno(stdin), &oflags); @@ -148,9 +148,9 @@ std::string dev::getPassword(std::string const& _prompt) password[strlen(password) - 1] = 0; // restore terminal - if (tcsetattr(fileno(stdin), TCSANOW, &oflags) != 0) { + if (tcsetattr(fileno(stdin), TCSANOW, &oflags) != 0) BOOST_THROW_EXCEPTION(ExternalFunctionFailure("tcsetattr")); - } + return password; #endif