1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Fix for BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS

Problem:      
lack of incoming geometry data validation may 
lead to a server crash when ISCLOSED() function called.

Solution:
necessary incoming data check added.
This commit is contained in:
Ramil Kalimullin
2012-03-05 21:58:07 +04:00
parent 98642459db
commit 44d88da575
3 changed files with 15 additions and 1 deletions

View File

@ -627,7 +627,8 @@ int Gis_line_string::is_closed(int *closed) const
return 0;
}
data+= 4;
if (no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
if (n_points == 0 ||
no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points))
return 1;
/* Get first point */