From 5ec8bbbe2244ea70d8aa74b5c572351632699425 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Wed, 10 Oct 2007 00:01:43 +0000 Subject: svn merge -r71238:71367 svn+ssh://svn/svn/linden/branches/maint-ui-qa3 --- indra/newview/llpanellogin.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'indra/newview/llpanellogin.cpp') 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"); } -- cgit v1.2.3