diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2013-03-18 17:58:00 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2013-03-18 17:58:00 +0400 |
commit | 589247ae86b25eaa9bd75e4f26ecd06831469311 (patch) | |
tree | 59322d96d5fd1f4f28565101f06a64aa23c028f0 /sql/spatial.h | |
parent | a4a18e0cbbaf2a43507b3c2232fed700403ad04d (diff) | |
download | mariadb-git-589247ae86b25eaa9bd75e4f26ecd06831469311.tar.gz |
MDEV-4252 geometry query crashes server.
Additional fixes for possible overflows in length-related
calculations in 'spatial' implementations.
Checks added to the ::get_data_size() methods.
max_n_points decreased to occupy less 2G size. An
object of that size is practically inoperable anyway.
Diffstat (limited to 'sql/spatial.h')
-rw-r--r-- | sql/spatial.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/spatial.h b/sql/spatial.h index 7d254252b3f..d7632c11143 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -199,7 +199,7 @@ class Geometry public: // Maximum number of points in feature that can fit into String static const uint32 max_n_points= - (uint32) (UINT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) / + (uint32) (INT_MAX32 - WKB_HEADER_SIZE - 4 /* n_points */) / POINT_DATA_SIZE; public: Geometry() {} /* Remove gcc warning */ |