mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Fix opportunities for integer overflow
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.27.6
|
||||||
|
|
||||||
|
* Fix opportunities for integer overflow and out-of-bounds references
|
||||||
|
|
||||||
## 1.27.5
|
## 1.27.5
|
||||||
|
|
||||||
* Add --cluster-densest-as-needed to cluster features
|
* Add --cluster-densest-as-needed to cluster features
|
||||||
|
|||||||
+5
-1
@@ -473,7 +473,11 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sf.extent = (long long) extent;
|
if (extent <= LLONG_MAX) {
|
||||||
|
sf.extent = (long long) extent;
|
||||||
|
} else {
|
||||||
|
sf.extent = LLONG_MAX;
|
||||||
|
}
|
||||||
|
|
||||||
if (!prevent[P_INPUT_ORDER]) {
|
if (!prevent[P_INPUT_ORDER]) {
|
||||||
sf.seq = 0;
|
sf.seq = 0;
|
||||||
|
|||||||
+1920
-4
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "tippecanoe v1.27.5\n"
|
#define VERSION "tippecanoe v1.27.6\n"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-10
@@ -118,19 +118,11 @@ void layer_to_geojson(FILE *fp, mvt_layer const &layer, unsigned z, unsigned x,
|
|||||||
} else if (val.type == mvt_double) {
|
} else if (val.type == mvt_double) {
|
||||||
fprintq(fp, key);
|
fprintq(fp, key);
|
||||||
double v = val.numeric_value.double_value;
|
double v = val.numeric_value.double_value;
|
||||||
if (v == (long long) v) {
|
fprintf(fp, ": %s", milo::dtoa_milo(v).c_str());
|
||||||
fprintf(fp, ": %lld", (long long) v);
|
|
||||||
} else {
|
|
||||||
fprintf(fp, ": %s", milo::dtoa_milo(v).c_str());
|
|
||||||
}
|
|
||||||
} else if (val.type == mvt_float) {
|
} else if (val.type == mvt_float) {
|
||||||
fprintq(fp, key);
|
fprintq(fp, key);
|
||||||
double v = val.numeric_value.float_value;
|
double v = val.numeric_value.float_value;
|
||||||
if (v == (long long) v) {
|
fprintf(fp, ": %s", milo::dtoa_milo(v).c_str());
|
||||||
fprintf(fp, ": %lld", (long long) v);
|
|
||||||
} else {
|
|
||||||
fprintf(fp, ": %s", milo::dtoa_milo(v).c_str());
|
|
||||||
}
|
|
||||||
} else if (val.type == mvt_sint) {
|
} else if (val.type == mvt_sint) {
|
||||||
fprintq(fp, key);
|
fprintq(fp, key);
|
||||||
fprintf(fp, ": %lld", val.numeric_value.sint_value);
|
fprintf(fp, ": %lld", val.numeric_value.sint_value);
|
||||||
|
|||||||
Reference in New Issue
Block a user