From 486128b22ee0aed9c2effbc7bc112a5903b3e7cb Mon Sep 17 00:00:00 2001 From: Flole Date: Sat, 6 Jul 2024 00:00:13 +0200 Subject: [PATCH] Prevent possible buffer overrun found by coverity (#418) --- lib/host/gtk3/base_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/host/gtk3/base_view.cpp b/lib/host/gtk3/base_view.cpp index 54cef924..3ebc3e51 100644 --- a/lib/host/gtk3/base_view.cpp +++ b/lib/host/gtk3/base_view.cpp @@ -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) {