From 358715e2bb4e9153b473a7f38e0f2a854150eab6 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Thu, 9 Apr 2026 15:10:09 +0100 Subject: [PATCH 1/2] Remove unused `` include --- fuzzer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fuzzer.cpp b/fuzzer.cpp index 7e04375..9ba0fdb 100644 --- a/fuzzer.cpp +++ b/fuzzer.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -17,9 +16,8 @@ static std::string ToAbsolutePath(const std::string argv0, const std::string relativePath) { char absoluteRootPath[PATH_MAX+1]; - char argv0Copy[argv0.size()+1]; - memcpy(argv0Copy, argv0.c_str(), argv0.size()+1); - if ( realpath(dirname(argv0Copy), absoluteRootPath) == nullptr ) { + std::vector argv0Copy(argv0.c_str(), argv0.c_str() + argv0.size() + 1); + if ( realpath(dirname(argv0Copy.data()), absoluteRootPath) == nullptr ) { printf("Fatal error: Cannot resolve absolute root path\n"); abort(); } From 302ce352520aa255046160962f3d28d2d5925143 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Thu, 9 Apr 2026 15:12:06 +0100 Subject: [PATCH 2/2] split changes --- fuzzer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fuzzer.cpp b/fuzzer.cpp index 9ba0fdb..a213366 100644 --- a/fuzzer.cpp +++ b/fuzzer.cpp @@ -16,8 +16,9 @@ static std::string ToAbsolutePath(const std::string argv0, const std::string relativePath) { char absoluteRootPath[PATH_MAX+1]; - std::vector argv0Copy(argv0.c_str(), argv0.c_str() + argv0.size() + 1); - if ( realpath(dirname(argv0Copy.data()), absoluteRootPath) == nullptr ) { + char argv0Copy[argv0.size()+1]; + memcpy(argv0Copy, argv0.c_str(), argv0.size()+1); + if ( realpath(dirname(argv0Copy), absoluteRootPath) == nullptr ) { printf("Fatal error: Cannot resolve absolute root path\n"); abort(); }