mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Arrays for coalescing can get too big for the stack.
This commit is contained in:
@@ -511,7 +511,7 @@ long long write_tile(struct index *start, struct index *end, char *metabase, uns
|
|||||||
}
|
}
|
||||||
|
|
||||||
int nfeatures = 0;
|
int nfeatures = 0;
|
||||||
struct coalesce features[end - start];
|
struct coalesce *features = (struct coalesce *) malloc((end - start) * sizeof(struct coalesce));
|
||||||
|
|
||||||
struct index *i;
|
struct index *i;
|
||||||
for (i = start; i < end; i++) {
|
for (i = start; i < end; i++) {
|
||||||
@@ -642,6 +642,8 @@ long long write_tile(struct index *start, struct index *end, char *metabase, uns
|
|||||||
free(features[x].meta);
|
free(features[x].meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(features);
|
||||||
|
|
||||||
struct pool_val *pv;
|
struct pool_val *pv;
|
||||||
for (pv = keys.head; pv != NULL; pv = pv->next) {
|
for (pv = keys.head; pv != NULL; pv = pv->next) {
|
||||||
layer->add_keys(pv->s, strlen(pv->s));
|
layer->add_keys(pv->s, strlen(pv->s));
|
||||||
|
|||||||
Reference in New Issue
Block a user