Guard against decoding tiles with an impossible extent

This commit is contained in:
Eric Fischer 2017-10-30 12:48:55 -07:00
parent dfbb13e7db
commit a3e95db0c3

View File

@ -93,6 +93,11 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe, st
for (size_t l = 0; l < tile.layers.size(); l++) {
mvt_layer &layer = tile.layers[l];
if (layer.extent <= 0) {
fprintf(stderr, "Impossible layer extent %lld in mbtiles\n", layer.extent);
exit(EXIT_FAILURE);
}
if (to_decode.size() != 0 && !to_decode.count(layer.name)) {
continue;
}