diff options
author | Ramil Kalimullin <ramil.kalimullin@oracle.com> | 2012-03-05 22:36:56 +0400 |
---|---|---|
committer | Ramil Kalimullin <ramil.kalimullin@oracle.com> | 2012-03-05 22:36:56 +0400 |
commit | d371d5394531fc371facf2081763f66a5dd4ed94 (patch) | |
tree | 7c42dc5cc151be239f1ffc2ef5ca6fb09a66fe70 /sql/spatial.cc | |
parent | 6d393110fa275f48464296f96fd69b1e441311db (diff) | |
parent | 30d32207e724ebf9dca7c2ecdaec04b076cd902b (diff) | |
download | mariadb-git-d371d5394531fc371facf2081763f66a5dd4ed94.tar.gz |
Auto-merge from mysql-5.1-security.
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index ee701d82657..ceede83d9b2 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -609,7 +609,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 */ |