Skip to content

Commit

Permalink
Fix use-after-free in logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Jontified committed Nov 13, 2023
1 parent 2171469 commit 14454d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion windows/nsis-plugins/src/log/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ void __declspec(dllexport) NSISCALL SetLogTarget
FOLDERID_ProgramData));
logpath.append(L"Mullvad VPN");

const wchar_t* w_path = logpath.wstring().c_str();
auto logpath_wstring = logpath.wstring();
const wchar_t* w_path = logpath_wstring.c_str();

if (Status::Ok != create_privileged_directory(reinterpret_cast<const uint16_t*>(w_path)))
{
Expand Down

0 comments on commit 14454d4

Please sign in to comment.