We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 358715e commit 302ce35Copy full SHA for 302ce35
1 file changed
fuzzer.cpp
@@ -16,8 +16,9 @@
16
17
static std::string ToAbsolutePath(const std::string argv0, const std::string relativePath) {
18
char absoluteRootPath[PATH_MAX+1];
19
- std::vector<char> argv0Copy(argv0.c_str(), argv0.c_str() + argv0.size() + 1);
20
- if ( realpath(dirname(argv0Copy.data()), absoluteRootPath) == nullptr ) {
+ char argv0Copy[argv0.size()+1];
+ memcpy(argv0Copy, argv0.c_str(), argv0.size()+1);
21
+ if ( realpath(dirname(argv0Copy), absoluteRootPath) == nullptr ) {
22
printf("Fatal error: Cannot resolve absolute root path\n");
23
abort();
24
}
0 commit comments