Skip to content

Commit 302ce35

Browse files
split changes
1 parent 358715e commit 302ce35

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

fuzzer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@
1616

1717
static std::string ToAbsolutePath(const std::string argv0, const std::string relativePath) {
1818
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 ) {
19+
char argv0Copy[argv0.size()+1];
20+
memcpy(argv0Copy, argv0.c_str(), argv0.size()+1);
21+
if ( realpath(dirname(argv0Copy), absoluteRootPath) == nullptr ) {
2122
printf("Fatal error: Cannot resolve absolute root path\n");
2223
abort();
2324
}

0 commit comments

Comments
 (0)