mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-01 16:58:05 +00:00
Arrays for coalescing can get too big for the stack.
This commit is contained in:
parent
98b0cb5e3f
commit
099623cd32
4
tile.cc
4
tile.cc
@ -511,7 +511,7 @@ long long write_tile(struct index *start, struct index *end, char *metabase, uns
|
||||
}
|
||||
|
||||
int nfeatures = 0;
|
||||
struct coalesce features[end - start];
|
||||
struct coalesce *features = (struct coalesce *) malloc((end - start) * sizeof(struct coalesce));
|
||||
|
||||
struct index *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);
|
||||
|
||||
struct pool_val *pv;
|
||||
for (pv = keys.head; pv != NULL; pv = pv->next) {
|
||||
layer->add_keys(pv->s, strlen(pv->s));
|
||||
|
Loading…
x
Reference in New Issue
Block a user