summary'>refslog'>tree'>commit'>diffstats
diff options
context:
space:
mode:
authorHeiko Hund <heikoh@users.sf.net>2011-07-21 17:59:08 +0200
committerHeiko Hund <heikoh@users.sf.net>2011-07-21 17:59:08 +0200
commit3653d41931eec57f6bbcd6f50fb8e495ee01c3da ( (patch)
tree'>595b3684aaa0e0b73f39e85f207d4ad87a2c44ba
parent'>update Swedish localization (diff)
downloadopenvpn-gui-3653d41931eec57f6bbcd6f50fb8e495ee01c3da.tar.gz
fix write out of array bounds
-rw-r--r--openvpn.c4
-rw-r--r--proxy.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/openvpn.c b/openvpn.c
index 29d82d9..4df60fa 100644
--- a/openvpn.c
+++ b/openvpn.c
@@ -240,7 +240,7 @@ UserAuthDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
/* Clear buffers */
memset(buf, 'x', sizeof(buf));
- buf[sizeof(buf) - 1] = _T('\0');
+ buf[_tsizeof(buf) - 1] = _T('\0');
SetDlgItemText(hwndDlg, ID_EDT_AUTH_USER, buf);
SetDlgItemText(hwndDlg, ID_EDT_AUTH_PASS, buf);
@@ -297,7 +297,7 @@ PrivKeyPassDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
/* Clear buffer */
memset(buf, 'x', sizeof(buf));
- buf[sizeof(buf) - 1] = _T('\0');
+ buf[_tsizeof(buf) - 1] = _T('\0');
SetDlgItemText(hwndDlg, ID_EDT_PASSPHRASE, buf);
EndDialog(hwndDlg, LOWORD(wParam));
diff --git a/proxy.c b/ b/proxy.c
index ce2a57e..8004bca 100644
--- a/proxy.c
+++ b/proxy.c
@@ -357,7 +357,7 @@ ProxyAuthDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
/* Clear buffers */
memset(buf, 'x', sizeof(buf));
- buf[sizeof(buf) - 1] = _T('\0');
+ buf[_tsizeof(buf) - 1] = _T('\0');
SetDlgItemText(hwndDlg, ID_EDT_PROXY_USER, buf);
SetDlgItemText(hwndDlg, ID_EDT_PROXY_PASS, buf);