aboutsummaryrefslogtreecommitdiff
path: root/test/fuzzers/proj_crs_to_crs_fuzzer.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-26 18:34:36 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-01-26 19:39:51 +0100
commit0f22959cb2f052fd55e2b8b83289d9eca7b1c71f (patch)
tree41e511ae88eac4a3c8e178843e7d38d60396157d /test/fuzzers/proj_crs_to_crs_fuzzer.cpp
parent9cdebf7ecf248f1d77ccd5a932144bd9eccc3863 (diff)
downloadPROJ-0f22959cb2f052fd55e2b8b83289d9eca7b1c71f.tar.gz
PROJ-0f22959cb2f052fd55e2b8b83289d9eca7b1c71f.zip
Fix ossfuzz builds [ci skip]
Diffstat (limited to 'test/fuzzers/proj_crs_to_crs_fuzzer.cpp')
-rw-r--r--test/fuzzers/proj_crs_to_crs_fuzzer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/fuzzers/proj_crs_to_crs_fuzzer.cpp b/test/fuzzers/proj_crs_to_crs_fuzzer.cpp
index 9b4b1ed9..a23cc0d9 100644
--- a/test/fuzzers/proj_crs_to_crs_fuzzer.cpp
+++ b/test/fuzzers/proj_crs_to_crs_fuzzer.cpp
@@ -34,7 +34,6 @@
#include <sys/types.h>
#include <unistd.h>
-#include "proj_internal.h" // For pj_gc_unloadall()
#include "proj.h"
/* Standalone build:
@@ -47,7 +46,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len);
int LLVMFuzzerInitialize(int* /*argc*/, char*** argv)
{
const char* argv0 = (*argv)[0];
- char* path = pj_strdup(argv0);
+ char* path = strdup(argv0);
char* lastslash = strrchr(path, '/');
if( lastslash )
{
@@ -96,8 +95,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len)
proj_create_crs_to_crs(nullptr, first_line, second_line, nullptr));
free(buf_dup);
- pj_gc_unloadall(pj_get_default_ctx());
- pj_deallocate_grids();
+ proj_cleanup();
return 0;
}