X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb9bea06cfde83c7b4945c5b76cf94e5b58377b3..31c94c2987a6cfb55fee37f48fb76ebe334bc6ef:/src/msw/dialup.cpp diff --git a/src/msw/dialup.cpp b/src/msw/dialup.cpp index 566c31c335..afab3e9a9d 100644 --- a/src/msw/dialup.cpp +++ b/src/msw/dialup.cpp @@ -807,7 +807,7 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, RASDIALPARAMS rasDialParams; rasDialParams.dwSize = sizeof(rasDialParams); - wxStrncpy(rasDialParams.szEntryName, entryName, RAS_MaxEntryName); + wxStrlcpy(rasDialParams.szEntryName, entryName.c_str(), RAS_MaxEntryName); // do we have the username and password? if ( !username || !password ) @@ -829,8 +829,8 @@ bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP, } else { - wxStrncpy(rasDialParams.szUserName, username, UNLEN); - wxStrncpy(rasDialParams.szPassword, password, PWLEN); + wxStrlcpy(rasDialParams.szUserName, username.c_str(), UNLEN); + wxStrlcpy(rasDialParams.szPassword, password.c_str(), PWLEN); } // default values for other fields