1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-30150 ST_GeomFromGeoJSON, 'geometry' before 'type: feature' error

The geometry type requires Type:"Feature" but the feature need
not be first in the JSON structure.

Adjust code to return an error if geometry isn't a JSON object,
but continue parsing searching for Type: "Feature" to trigger
the geometry parsing.

Thanks Derick Magnusen for the bug report.
This commit is contained in:
Daniel Black
2022-12-03 15:09:48 +11:00
parent d360fa6fa8
commit 8f3631d009
3 changed files with 6 additions and 1 deletions

View File

@ -611,7 +611,8 @@ Geometry *Geometry::create_from_json(Geometry_buffer *buffer,
if (feature_type_found)
goto handle_geometry_key;
}
goto err_return;
else
goto err_return;
}
else
{