projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
restore tabg.cpp for wxMotif's wxNotebook implementation
[wxWidgets.git]
/
src
/
msw
/
dialup.cpp
diff --git
a/src/msw/dialup.cpp
b/src/msw/dialup.cpp
index b708fb4612c07853dc7bec9c94ca604ae1ec7ee9..afab3e9a9dc23fd808f302c10ba5f3b72657c386 100644
(file)
--- a/
src/msw/dialup.cpp
+++ b/
src/msw/dialup.cpp
@@
-709,7
+709,13
@@
size_t wxDialUpManagerMSW::GetISPNames(wxArrayString& names) const
if ( dwRet == ERROR_BUFFER_TOO_SMALL )
{
// reallocate the buffer
if ( dwRet == ERROR_BUFFER_TOO_SMALL )
{
// reallocate the buffer
- rasEntries = (RASENTRYNAME *)realloc(rasEntries, size);
+ void *n = realloc(rasEntries, size);
+ if (n == NULL)
+ {
+ free(rasEntries);
+ return 0;
+ }
+ rasEntries = (RASENTRYNAME *)n;
}
else if ( dwRet != 0 )
{
}
else if ( dwRet != 0 )
{
@@
-801,7
+807,7
@@
bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
RASDIALPARAMS rasDialParams;
rasDialParams.dwSize = sizeof(rasDialParams);
RASDIALPARAMS rasDialParams;
rasDialParams.dwSize = sizeof(rasDialParams);
- wxStr
ncpy(rasDialParams.szEntryName, entryName
, RAS_MaxEntryName);
+ wxStr
lcpy(rasDialParams.szEntryName, entryName.c_str()
, RAS_MaxEntryName);
// do we have the username and password?
if ( !username || !password )
// do we have the username and password?
if ( !username || !password )
@@
-823,8
+829,8
@@
bool wxDialUpManagerMSW::Dial(const wxString& nameOfISP,
}
else
{
}
else
{
- wxStr
ncpy(rasDialParams.szUserName, username
, UNLEN);
- wxStr
ncpy(rasDialParams.szPassword, password
, PWLEN);
+ wxStr
lcpy(rasDialParams.szUserName, username.c_str()
, UNLEN);
+ wxStr
lcpy(rasDialParams.szPassword, password.c_str()
, PWLEN);
}
// default values for other fields
}
// default values for other fields