mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Fix some undefined behavior (#209)
* Fix some undefined behavior
* Avoid overflow in line simplification calculations
* Oops, missed a test
* Didn't mean to add that to the Makefile
* Revert "Revert "[ci] test in debug mode (#202)""
This reverts commit c95c328e47.
* Fix reference to out-of-scope pointer
* Fix invalid shift and out-of-bounds vector element reference
* Update changelog and version
This commit is contained in:
+2
-1
@@ -105,7 +105,8 @@ int serialize_geojson_feature(struct serialization_state *sst, json_object *geom
|
||||
if (id->type == JSON_NUMBER) {
|
||||
if (id->value.number.number >= 0) {
|
||||
char *err = NULL;
|
||||
id_value = strtoull(milo::dtoa_milo(id->value.number.number).c_str(), &err, 10);
|
||||
std::string id_number = milo::dtoa_milo(id->value.number.number);
|
||||
id_value = strtoull(id_number.c_str(), &err, 10);
|
||||
|
||||
if (id->value.number.large_unsigned != 0) {
|
||||
id_value = id->value.number.large_unsigned;
|
||||
|
||||
Reference in New Issue
Block a user