Skip to content

Commit 358715e

Browse files
Remove unused <sstream> include
1 parent 5c414fc commit 358715e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

fuzzer.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include <cstdlib>
33
#include <iomanip>
44
#include <libgen.h>
5-
#include <sstream>
65
#include <vector>
76
#include <string>
87
#include <optional>
@@ -17,9 +16,8 @@
1716

1817
static std::string ToAbsolutePath(const std::string argv0, const std::string relativePath) {
1918
char absoluteRootPath[PATH_MAX+1];
20-
char argv0Copy[argv0.size()+1];
21-
memcpy(argv0Copy, argv0.c_str(), argv0.size()+1);
22-
if ( realpath(dirname(argv0Copy), absoluteRootPath) == nullptr ) {
19+
std::vector<char> argv0Copy(argv0.c_str(), argv0.c_str() + argv0.size() + 1);
20+
if ( realpath(dirname(argv0Copy.data()), absoluteRootPath) == nullptr ) {
2321
printf("Fatal error: Cannot resolve absolute root path\n");
2422
abort();
2523
}

0 commit comments

Comments
 (0)