From 0952bf2da5a8adf26794b730f98bfa18f95d28db Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Mar 2004 00:42:10 +0200 Subject: [PATCH] Fixed memory overrun in spatial init code sql/spatial.cc: Fixed memory overrun sql/spatial.h: Fixed memory overrun --- sql/spatial.cc | 2 +- sql/spatial.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/spatial.cc b/sql/spatial.cc index ec6bfb307b9..ab415d9af10 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -19,7 +19,7 @@ /***************************** Gis_class_info *******************************/ -Geometry::Class_info *Geometry::ci_collection[Geometry::wkb_end]= +Geometry::Class_info *Geometry::ci_collection[Geometry::wkb_end+1]= { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; diff --git a/sql/spatial.h b/sql/spatial.h index 26396dd0f90..213bbbf6323 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -251,7 +251,7 @@ public: } bool envelope(String *result) const; - static Geometry::Class_info *ci_collection[Geometry::wkb_end]; + static Geometry::Class_info *ci_collection[Geometry::wkb_end+1]; protected: static Class_info *find_class(int type_id)