diff options
author | Christian Goetze <cg@lindenlab.com> | 2007-10-10 00:01:43 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2007-10-10 00:01:43 +0000 |
commit | 5ec8bbbe2244ea70d8aa74b5c572351632699425 (patch) | |
tree | 12a4e92720c531105a21ef4f9f363b8572d72a3a /indra/newview/llpanellogin.cpp | |
parent | b3b62c3b9ef32c4dbcae51cd3ef582734d5717bb (diff) |
svn merge -r71238:71367 svn+ssh://svn/svn/linden/branches/maint-ui-qa3
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index dda8efd126..292f5c36f8 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -132,8 +132,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mHtmlAvailable( TRUE ) { mIsFocusRoot = TRUE; - mMungedPassword[0] = '\0'; - mIncomingPassword[0] = '\0'; setBackgroundVisible(FALSE); setBackgroundOpaque(TRUE); @@ -346,7 +344,9 @@ void LLPanelLogin::mungePassword(LLUICtrl* caller, void* user_data) if (password != self->mIncomingPassword) { LLMD5 pass((unsigned char *)password.c_str()); - pass.hex_digest(self->mMungedPassword); + char munged_password[MD5HEX_STR_SIZE]; + pass.hex_digest(munged_password); + self->mMungedPassword = munged_password; } } @@ -559,19 +559,20 @@ void LLPanelLogin::setFields(const std::string& firstname, const std::string& la // We don't actually use the password input field, // fill it with MAX_PASSWORD characters so we get a // nice row of asterixes. - const char* filler = "123456789!123456"; + const std::string filler("123456789!123456"); sInstance->childSetText("password_edit", filler); - strcpy(sInstance->mIncomingPassword, filler); /*Flawfinder: ignore*/ - strcpy(sInstance->mMungedPassword, password.c_str()); /*Flawfinder: ignore*/ + sInstance->mIncomingPassword = filler; + sInstance->mMungedPassword = password; } else { // this is a normal text password sInstance->childSetText("password_edit", password); - strncpy(sInstance->mIncomingPassword, password.c_str(), sizeof(sInstance->mIncomingPassword) -1); /*Flawfinder: ignore*/ - sInstance->mIncomingPassword[sizeof(sInstance->mIncomingPassword) -1] = '\0'; + sInstance->mIncomingPassword = password; LLMD5 pass((unsigned char *)password.c_str()); - pass.hex_digest(sInstance->mMungedPassword); + char munged_password[MD5HEX_STR_SIZE]; + pass.hex_digest(munged_password); + sInstance->mMungedPassword = munged_password; } sInstance->childSetValue("remember_check", remember); @@ -611,7 +612,7 @@ void LLPanelLogin::getFields(LLString &firstname, LLString &lastname, LLString & lastname = sInstance->childGetText("last_name_edit"); LLString::trim(lastname); - password.assign( sInstance->mMungedPassword ); + password = sInstance->mMungedPassword; remember = sInstance->childGetValue("remember_check"); } |