From b055cd5af149ce164dcfe36eb5a99cf4927eb1d5 Mon Sep 17 00:00:00 2001 From: Isaac Brodsky Date: Mon, 4 Dec 2023 12:01:10 -0800 Subject: [PATCH] fix size estimation --- src/apps/fuzzers/fuzzerPolygonToCellsExperimental.c | 3 ++- src/apps/fuzzers/fuzzerPolygonToCellsExperimentalNoHoles.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apps/fuzzers/fuzzerPolygonToCellsExperimental.c b/src/apps/fuzzers/fuzzerPolygonToCellsExperimental.c index 109f34baa..23a9b43fa 100644 --- a/src/apps/fuzzers/fuzzerPolygonToCellsExperimental.c +++ b/src/apps/fuzzers/fuzzerPolygonToCellsExperimental.c @@ -54,7 +54,8 @@ int populateGeoLoop(GeoLoop *g, const uint8_t *data, size_t *offset, void run(GeoPolygon *geoPolygon, uint32_t flags, int res) { int64_t sz; - H3Error err = H3_EXPORT(maxPolygonToCellsSize)(geoPolygon, res, flags, &sz); + H3Error err = H3_EXPORT(maxPolygonToCellsSizeExperimental)(geoPolygon, res, + flags, &sz); if (!err && sz < MAX_SZ) { H3Index *out = calloc(sz, sizeof(H3Index)); H3_EXPORT(polygonToCellsExperimental)(geoPolygon, res, flags, out); diff --git a/src/apps/fuzzers/fuzzerPolygonToCellsExperimentalNoHoles.c b/src/apps/fuzzers/fuzzerPolygonToCellsExperimentalNoHoles.c index 0649887ad..eca247d5e 100644 --- a/src/apps/fuzzers/fuzzerPolygonToCellsExperimentalNoHoles.c +++ b/src/apps/fuzzers/fuzzerPolygonToCellsExperimentalNoHoles.c @@ -29,7 +29,8 @@ const int MAX_SZ = 4000000; void run(GeoPolygon *geoPolygon, uint32_t flags, int res) { int64_t sz; - H3Error err = H3_EXPORT(maxPolygonToCellsSize)(geoPolygon, res, flags, &sz); + H3Error err = H3_EXPORT(maxPolygonToCellsSizeExperimental)(geoPolygon, res, + flags, &sz); if (!err && sz < MAX_SZ) { H3Index *out = calloc(sz, sizeof(H3Index)); H3_EXPORT(polygonToCellsExperimental)(geoPolygon, res, flags, out);