felt / tippecanoe

Build vector tilesets from large collections of GeoJSON features.
BSD 2-Clause "Simplified" License
875 stars 76 forks source link

Fix hash collision in the string pool #239

Closed e-n-f closed 1 month ago

e-n-f commented 1 month ago

As reported in https://github.com/felt/tippecanoe/issues/235, certain pairs of strings were being considered to be duplicates of each other when in fact they were not.

The previous version of the code truncated the hash after checking for equality, instead of truncating first, which allowed an equal-hashes value to be returned without checking for actual string equality.

The previously-colliding strings are now tested in the tests/overture-235 test case.