summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-07-02 17:00:05 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-07-02 17:00:05 +0300
commit0ad8a825a8901d4b5e704fed3fc65e93cea18f18 (patch)
tree69238e9b52a7166b603e3ebbb2c7ea1b616765ed /sql/spatial.cc
parent315380a4d16ddb16461d906a23be341e354c30ed (diff)
parent779262842edf86c989c099c6930ae4683cbde609 (diff)
downloadmariadb-git-0ad8a825a8901d4b5e704fed3fc65e93cea18f18.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r--sql/spatial.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index df5a46ac8cc..527a1df9d1f 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -563,7 +563,11 @@ Geometry *Geometry::create_from_json(Geometry_buffer *buffer,
goto handle_geometry_key;
feature_type_found= 1;
}
+ else /* can't understand the type. */
+ break;
}
+ else /* The "type" value can only be string. */
+ break;
}
else if (key_len == coord_keyname_len &&
memcmp(key_buf, coord_keyname, coord_keyname_len) == 0)
@@ -580,6 +584,8 @@ Geometry *Geometry::create_from_json(Geometry_buffer *buffer,
coord_start= je->value_begin;
if (ci && ci != &geometrycollection_class)
goto create_geom;
+ if (json_skip_level(je))
+ goto err_return;
}
}
else if (key_len == geometries_keyname_len &&