mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Guard against impossible tile coordinates when decoding
This commit is contained in:
@@ -119,6 +119,12 @@ void handle(std::string message, int z, unsigned x, unsigned y, int describe, st
|
||||
}
|
||||
}
|
||||
|
||||
// X and Y are unsigned, so no need to check <0
|
||||
if (x > (1 << z) || y > (1 << z)) {
|
||||
fprintf(stderr, "Impossible tile %d/%u/%u\n", z, x, y);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
layer_to_geojson(stdout, layer, z, x, y, !pipeline, pipeline, pipeline, 0, 0, 0, !force);
|
||||
|
||||
if (!pipeline) {
|
||||
|
||||
Reference in New Issue
Block a user