mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
Automerge.
This commit is contained in:
commit
385a473803
3 changed files with 21 additions and 2 deletions
|
|
@ -511,7 +511,7 @@ uint Gis_line_string::init_from_wkb(const char *wkb, uint len,
|
|||
n_points= wkb_get_uint(wkb, bo);
|
||||
proper_length= 4 + n_points * POINT_DATA_SIZE;
|
||||
|
||||
if (len < proper_length || res->reserve(proper_length))
|
||||
if (!n_points || len < proper_length || res->reserve(proper_length))
|
||||
return 0;
|
||||
|
||||
res->q_append(n_points);
|
||||
|
|
@ -729,7 +729,9 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
|
|||
if (len < 4)
|
||||
return 0;
|
||||
|
||||
n_linear_rings= wkb_get_uint(wkb, bo);
|
||||
if (!(n_linear_rings= wkb_get_uint(wkb, bo)))
|
||||
return 0;
|
||||
|
||||
if (res->reserve(4, 512))
|
||||
return 0;
|
||||
wkb+= 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue