summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-07-02 13:02:26 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-07-02 13:02:26 +0300
commit15dcb8bd3e80d233107a6ad17751d46e1839cf85 (patch)
tree6aac86ed548ad3e3d9ceba77353da642be3fe526 /sql/spatial.cc
parent617dee34886987c53b14e09a9ee73abe923a18e4 (diff)
parentc294443b41bff54eb11ac68f23b9366c0cb9ef90 (diff)
downloadmariadb-git-15dcb8bd3e80d233107a6ad17751d46e1839cf85.tar.gz
Merge 10.4 into 10.5
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 13fff34df21..a06c7652267 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -565,7 +565,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)
@@ -582,6 +586,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 &&