Fix known cases of integer overflow

This commit is contained in:
Erica Fischer
2023-09-07 16:36:28 -07:00
parent 1ccbb6306c
commit ba6bc08de6
4 changed files with 69 additions and 23 deletions
+2 -1
View File
@@ -202,7 +202,8 @@ std::vector<mvt_layer> parse_layers(int fd, int z, unsigned x, unsigned y, std::
}
if (mb_geometry[t] == VT_POLYGON) {
dv = clean_or_clip_poly(dv, 0, 0, false);
// we can try scaling up because these are tile coordinates
dv = clean_or_clip_poly(dv, 0, 0, false, true);
if (dv.size() < 3) {
dv.clear();
}