diff options
author | Martin Hansson <mhansson@mysql.com> | 2009-06-17 16:58:33 +0200 |
---|---|---|
committer | Martin Hansson <mhansson@mysql.com> | 2009-06-17 16:58:33 +0200 |
commit | 0d460bcd65f484c1c2e415795f29b8d1949faacf (patch) | |
tree | 3584c1f653c4ed2a1ea5590285b4e1c7f4bc76f8 /mysql-test/r | |
parent | ed7f0f3023041cc1749077ad45cd5a8bb8fa784e (diff) | |
download | mariadb-git-0d460bcd65f484c1c2e415795f29b8d1949faacf.tar.gz |
Bug#44684: valgrind reports invalid reads in
Item_func_spatial_collection::val_str
When the concatenation function for geometry data collections
reads the binary data it was not rigorous in checking that there
is data available, leading to invalid reads and crashes.
Fixed by making checking stricter.
mysql-test/r/gis.result:
Bug#44684: Test result
mysql-test/t/gis.test:
Bug#44684: Test case
sql/item_geofunc.cc:
Bug#44684: fix(es)
- Check that there are 4 bytes available for type code.
- Check that there is at least one point available for linestring.
- Check that there are at least 2 points in a polygon and
data for all the points.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/gis.result | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 494b7a36532..a3708d06a1c 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -984,4 +984,52 @@ f4 geometry YES NULL f5 datetime YES NULL drop view v1; drop table t1; +SELECT MultiPoint(12345,''); +MultiPoint(12345,'') +NULL +SELECT MultiPoint(123451,''); +MultiPoint(123451,'') +NULL +SELECT MultiPoint(1234512,''); +MultiPoint(1234512,'') +NULL +SELECT MultiPoint(12345123,''); +MultiPoint(12345123,'') +NULL +SELECT MultiLineString(12345,''); +MultiLineString(12345,'') +NULL +SELECT MultiLineString(123451,''); +MultiLineString(123451,'') +NULL +SELECT MultiLineString(1234512,''); +MultiLineString(1234512,'') +NULL +SELECT MultiLineString(12345123,''); +MultiLineString(12345123,'') +NULL +SELECT LineString(12345,''); +LineString(12345,'') +NULL +SELECT LineString(123451,''); +LineString(123451,'') +NULL +SELECT LineString(1234512,''); +LineString(1234512,'') +NULL +SELECT LineString(12345123,''); +LineString(12345123,'') +NULL +SELECT Polygon(12345,''); +Polygon(12345,'') +NULL +SELECT Polygon(123451,''); +Polygon(123451,'') +NULL +SELECT Polygon(1234512,''); +Polygon(1234512,'') +NULL +SELECT Polygon(12345123,''); +Polygon(12345123,'') +NULL End of 5.1 tests |