diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2022-10-25 23:48:54 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2022-10-26 00:20:40 +0400 |
commit | 77951dd7102381385093209a1f2597d28e39900a (patch) | |
tree | af6e4edd881774bc8f59f84129c8a18675a0ad4d /sql/spatial.h | |
parent | e910dff81ebaa84d0028705d20a40abe8f779afd (diff) | |
download | mariadb-git-77951dd7102381385093209a1f2597d28e39900a.tar.gz |
MDEV-26161 crash in Gis_point::calculate_haversine
More checks for bad geometry data added.
Diffstat (limited to 'sql/spatial.h')
-rw-r--r-- | sql/spatial.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/spatial.h b/sql/spatial.h index 0c00482c09b..1a69b32bb1c 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -354,6 +354,7 @@ protected: const char *get_mbr_for_points(MBR *mbr, const char *data, uint offset) const; +public: /** Check if there're enough data remaining as requested @@ -384,6 +385,7 @@ protected: (expected_points > ((m_data_end - data) / (POINT_DATA_SIZE + extra_point_space)))); } +protected: const char *m_data; const char *m_data_end; }; |