diff options
Diffstat (limited to 'plugins/HistoryLinkListPlus/src')
-rw-r--r-- | plugins/HistoryLinkListPlus/src/linklist_dlg.cpp | 2 | ||||
-rw-r--r-- | plugins/HistoryLinkListPlus/src/linklist_fct.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index 8ed8ba5cd9..8154146c11 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -519,7 +519,7 @@ INT_PTR WINAPI SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam flags = flags | SLL_DEEP;
length = GetWindowTextLength(GetDlgItem(hDlg, IDC_SEARCHSTRING))+1;
- buffer = (LPTSTR)malloc( length*sizeof(TCHAR));
+ buffer = (LPTSTR)malloc( (length + 1)*sizeof(TCHAR));
GetDlgItemText(hDlg, IDC_SEARCHSTRING, buffer, length);
WriteLinkList(hListDlg, flags, DlgParam->listStart, buffer, 0);
free(buffer);
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index 81dc82af75..1da3264c10 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -1283,7 +1283,7 @@ BOOL SaveEditAsStream( HWND hDlg ) mir_sntprintf(temp, SIZEOF(temp), _T("%s (*.rtf)%c*.rtf%c%s (*.*)%c*.*%c%c"), TranslateT("RTF file"), 0, 0, TranslateT("All files"), 0, 0, 0);
ofn.lpstrFilter = temp;
ofn.lpstrFile = szFilename;
- ofn.nMaxFile = _countof(szFilename);
+ ofn.nMaxFile = SIZEOF(szFilename);
ofn.lpstrTitle = TranslateT("Save RTF File");
ofn.Flags = OFN_OVERWRITEPROMPT;
// Get a filename or quit
|