fix write out of array bounds

pull/1/head
Heiko Hund 14 years ago
parent a1f2df515b
commit 3653d41931

@ -240,7 +240,7 @@ UserAuthDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
/* Clear buffers */ /* Clear buffers */
memset(buf, 'x', sizeof(buf)); 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_USER, buf);
SetDlgItemText(hwndDlg, ID_EDT_AUTH_PASS, buf); SetDlgItemText(hwndDlg, ID_EDT_AUTH_PASS, buf);
@ -297,7 +297,7 @@ PrivKeyPassDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
/* Clear buffer */ /* Clear buffer */
memset(buf, 'x', sizeof(buf)); memset(buf, 'x', sizeof(buf));
buf[sizeof(buf) - 1] = _T('\0'); buf[_tsizeof(buf) - 1] = _T('\0');
SetDlgItemText(hwndDlg, ID_EDT_PASSPHRASE, buf); SetDlgItemText(hwndDlg, ID_EDT_PASSPHRASE, buf);
EndDialog(hwndDlg, LOWORD(wParam)); EndDialog(hwndDlg, LOWORD(wParam));

@ -357,7 +357,7 @@ ProxyAuthDialogFunc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
/* Clear buffers */ /* Clear buffers */
memset(buf, 'x', sizeof(buf)); 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_USER, buf);
SetDlgItemText(hwndDlg, ID_EDT_PROXY_PASS, buf); SetDlgItemText(hwndDlg, ID_EDT_PROXY_PASS, buf);

Loading…
Cancel
Save