artemp/trac2github — Issue #575: ogr.input segfaults on invalid json data
Author: artemp
Created: 2011-10-09 20:41:29+00:00
State: open
Labels: OGR_Input_Driver

In mapnik 0.7.1-1 I get a segfault when calling render() on a map containing the following JSON data.

{{{
{"width": 200, "format": "image/png", "type": "FeatureCollection", "features": [{"geometry": "{ \\"type\\": \\"Point\\", \\"coordinates\\": [ 0.000000, 1.000000 ] }", "type": "Feature", "properties": {}}], "height": 200}
}}}

Note that the geometry JSON is a string when it should be an object. The OGR plugin should probably handle this with a more graceful error.