Skip to content

Commit

Permalink
Merge pull request #1588 from usagisita/feature/fix_buffer_grep_dlg_s…
Browse files Browse the repository at this point in the history
…et_folder

Grepダイアログのフォルダ名設定処理でのバッファオーバーラン修正
  • Loading branch information
usagisita authored Mar 16, 2021
2 parents 95d9b03 + eef259e commit 8f92e0b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sakura_core/dlg/CDlgGrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -913,11 +913,9 @@ LPVOID CDlgGrep::GetHelpIdTable(void)
static void SetGrepFolder( HWND hwndCtrl, LPCWSTR folder )
{
if( wcschr( folder, L';') ){
WCHAR szQuoteFolder[MAX_PATH];
szQuoteFolder[0] = L'"';
wcscpy( szQuoteFolder + 1, folder );
wcscat( szQuoteFolder, L"\"" );
::SetWindowText( hwndCtrl, szQuoteFolder );
std::wstring strQuoteFolder;
strQuoteFolder = std::wstring(L"\"") + folder + std::wstring(L"\"");
::SetWindowText( hwndCtrl, strQuoteFolder.c_str() );
}else{
::SetWindowText( hwndCtrl, folder );
}
Expand Down

0 comments on commit 8f92e0b

Please sign in to comment.