Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
385a4738
Commit
385a4738
authored
Sep 06, 2010
by
Ramil Kalimullin
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
6ea12e3b
ed8aa284
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
mysql-test/r/gis.result
mysql-test/r/gis.result
+7
-0
mysql-test/t/gis.test
mysql-test/t/gis.test
+10
-0
sql/spatial.cc
sql/spatial.cc
+4
-2
No files found.
mysql-test/r/gis.result
View file @
385a4738
...
@@ -1057,6 +1057,13 @@ NULL
...
@@ -1057,6 +1057,13 @@ NULL
SELECT Polygon(12345123,'');
SELECT Polygon(12345123,'');
Polygon(12345123,'')
Polygon(12345123,'')
NULL
NULL
#
# BUG#51875: crash when loading data into geometry function polyfromwkb
#
SET @a=0x00000000030000000100000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
SET @a=POLYFROMWKB(@a);
SET @a=0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440;
SET @a=POLYFROMWKB(@a);
End of 5.1 tests
End of 5.1 tests
CREATE TABLE t1(
CREATE TABLE t1(
col0 BINARY NOT NULL,
col0 BINARY NOT NULL,
...
...
mysql-test/t/gis.test
View file @
385a4738
...
@@ -725,6 +725,16 @@ SELECT Polygon(123451,'');
...
@@ -725,6 +725,16 @@ SELECT Polygon(123451,'');
SELECT
Polygon
(
1234512
,
''
);
SELECT
Polygon
(
1234512
,
''
);
SELECT
Polygon
(
12345123
,
''
);
SELECT
Polygon
(
12345123
,
''
);
--
echo
#
--
echo
# BUG#51875: crash when loading data into geometry function polyfromwkb
--
echo
#
SET
@
a
=
0x00000000030000000100000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440
;
SET
@
a
=
POLYFROMWKB
(
@
a
);
SET
@
a
=
0x00000000030000000000000000000000000000000000144000000000000014400000000000001840000000000000184000000000000014400000000000001440
;
SET
@
a
=
POLYFROMWKB
(
@
a
);
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
#
#
...
...
sql/spatial.cc
View file @
385a4738
...
@@ -511,7 +511,7 @@ uint Gis_line_string::init_from_wkb(const char *wkb, uint len,
...
@@ -511,7 +511,7 @@ uint Gis_line_string::init_from_wkb(const char *wkb, uint len,
n_points
=
wkb_get_uint
(
wkb
,
bo
);
n_points
=
wkb_get_uint
(
wkb
,
bo
);
proper_length
=
4
+
n_points
*
POINT_DATA_SIZE
;
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
;
return
0
;
res
->
q_append
(
n_points
);
res
->
q_append
(
n_points
);
...
@@ -729,7 +729,9 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
...
@@ -729,7 +729,9 @@ uint Gis_polygon::init_from_wkb(const char *wkb, uint len, wkbByteOrder bo,
if
(
len
<
4
)
if
(
len
<
4
)
return
0
;
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
))
if
(
res
->
reserve
(
4
,
512
))
return
0
;
return
0
;
wkb
+=
4
;
wkb
+=
4
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment