summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2015-11-01 20:37:23 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2015-11-01 20:37:23 +0400
commit641644a8629b9b437a1886cf19451f31a0181860 (patch)
tree0c3511123894a114730459a16a12204201ec0d1b
parent3e043b30ac03f0c7473da5bf1a433d4db84da7bd (diff)
downloadmariadb-git-641644a8629b9b437a1886cf19451f31a0181860.tar.gz
MDEV-8992 MariaDB crashes when accessing table with GIS features.
we don't test for not-existing gis extra in FRM.
-rw-r--r--sql/field.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/field.cc b/sql/field.cc
index 13a41ee6b1e..e3794986161 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -8326,6 +8326,9 @@ uint gis_field_options_read(const uchar *buf, uint buf_len,
*precision= *scale= *srid= 0;
*st_type= Field_geom::GEOM_STORAGE_WKB;
+ if (!buf) /* can only happen with the old FRM file */
+ goto end_of_record;
+
while (cbuf < buf_end)
{
switch ((option_id= *(cbuf++)))