Skip to content

Commit

Permalink
Prevent possible buffer overrun found by coverity (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flole998 authored Jul 5, 2024
1 parent 4c4ff79 commit 486128b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/host/gtk3/base_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ namespace cycfi::elements

std::filesystem::path get_app_path()
{
char result[PATH_MAX];
char result[PATH_MAX + 1];
// get the full path to the executable file of the current process.
if (auto count = readlink("/proc/self/exe", result, PATH_MAX); count != -1)
{
Expand Down

0 comments on commit 486128b

Please sign in to comment.