h3
h3 copied to clipboard
Null deference
There is no check for the failed malloc
https://github.com/uber/h3/blob/ed5c4f254af2ffbd527d507d3bdd7019df4120fc/src/h3lib/lib/h3Index.c#L355 This in turn would cause a segfault, when buff is dereferenced https://github.com/uber/h3/blob/ed5c4f254af2ffbd527d507d3bdd7019df4120fc/src/h3lib/lib/h3Index.c#L372
Thanks for pointing this out. #241 should be useful for testing for this kind of error, by injecting allocation failures.
I believe there is now a guard for this allocation.