Skip to content

Commit 8280403

Browse files
committed
Prevent possible buffer overrun found by coverity
1 parent 4c4ff79 commit 8280403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/host/gtk3/base_view.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ namespace cycfi::elements
687687

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

0 commit comments

Comments
 (0)