While parsing geoJSON, malformed inputs can cause the program to crash mapbox/api-gl#1530 (comment). The main reason of crash is the assertion failure in RapidJSON library when calling size() method. Turns out, malformed geoJSON can lead to a call to size() on an object that is not an array.
This pr fixes the issue by calling IsArray() before a call to size()
While parsing geoJSON, malformed inputs can cause the program to crash mapbox/api-gl#1530 (comment). The main reason of crash is the assertion failure in RapidJSON library when calling
size()
method. Turns out, malformed geoJSON can lead to a call tosize()
on an object that is not an array.This pr fixes the issue by calling
IsArray()
before a call tosize()
GL-Native issue: #562