Skip to content

Commit

Permalink
hooksystem: check for existing random outdir
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Apr 28, 2024
1 parent 335015f commit 95a5e75
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugins/HookSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@ CFunctionHook::SAssembly CFunctionHook::fixInstructionProbeRIPCalls(const SInstr

const auto RANDOMDIR = "/tmp/hypr/" + g_pTokenManager->getRandomUUID();

mkdir(RANDOMDIR.c_str(), S_IRWXU);
if (std::filesystem::exists(RANDOMDIR)) {
Debug::log(ERR, "[hooksystem] random out dir exists??");
return {};
}

if (mkdir(RANDOMDIR.c_str(), S_IRWXU) < 0)
return {};

if (!std::filesystem::exists(RANDOMDIR))
return {};
Expand Down

0 comments on commit 95a5e75

Please sign in to comment.