uber / h3

Hexagonal hierarchical geospatial indexing system
https://h3geo.org
Apache License 2.0
4.85k stars 459 forks source link

Fix potential OOB read in localIjToCell #684

Closed isaacbrodsky closed 2 years ago

isaacbrodsky commented 2 years ago

Fixes a potential out-of-bounds read in localIjToCell that can occur with a particular combination of base cell, resolution, and highly negative IJ coordinates. The coordinates were only being tested against positive bounds, which was incorrect. As the function that compares to unit vectors handles this already, that check is replaced with that call.

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-0.001%) to 99.034% when pulling 44d56b54c3033ba43770f51ff984ff74b758aaa4 on isaacbrodsky:fix-localij-array-oob into f581626150e2e2b02f0ee1636084dfb8a4563abf on uber:master.