Commit d2503a04 authored by unknown's avatar unknown

Fix for spatial objects

parent b82f3bbe
......@@ -2771,10 +2771,8 @@ String *Item_func_spatial_collection::val_str(String *str)
uint32 n_points;
double x1, y1, x2, y2;
if (len < WKB_HEADER_SIZE + 4 + 8 + 8)
if (len < 4 + 2 * POINT_DATA_SIZE)
goto ret;
data+=WKB_HEADER_SIZE;
len-=WKB_HEADER_SIZE;
uint32 llen=len;
const char *ldata=data;
......@@ -2786,10 +2784,6 @@ String *Item_func_spatial_collection::val_str(String *str)
float8get(y1,data);
data+=8;
len-= 4 + 8 + 8;
if (len < n_points * POINT_DATA_SIZE)
goto ret;
data+=(n_points-2) * POINT_DATA_SIZE;
float8get(x2,data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment