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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
75ceb6ff
Commit
75ceb6ff
authored
Oct 31, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-17298 ASAN unknown-crash / READ of size 1 in my_strntoul_8bit upon INSERT .. SELECT
parent
09e97299
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
mysql-test/r/ctype_latin1.result
mysql-test/r/ctype_latin1.result
+9
-0
mysql-test/t/ctype_latin1.test
mysql-test/t/ctype_latin1.test
+12
-0
strings/ctype-simple.c
strings/ctype-simple.c
+2
-2
No files found.
mysql-test/r/ctype_latin1.result
View file @
75ceb6ff
...
...
@@ -7963,5 +7963,14 @@ ABCDEFGHI-ABCDEFGHI
DROP TABLE t1;
SET optimizer_switch=@save_optimizer_switch;
#
# MDEV-17298 ASAN unknown-crash / READ of size 1 in my_strntoul_8bit upon INSERT .. SELECT
#
SET NAMES latin1;
CREATE TABLE t1 (a CHAR);
CREATE TABLE t2 (b ENUM('foo','bar'));
INSERT INTO t1 VALUES ('1');
INSERT INTO t2 SELECT * FROM t1;
DROP TABLE t1, t2;
#
# End of 10.0 tests
#
mysql-test/t/ctype_latin1.test
View file @
75ceb6ff
...
...
@@ -264,6 +264,18 @@ SET NAMES latin1;
--
source
include
/
ctype_mdev13118
.
inc
--
echo
#
--
echo
# MDEV-17298 ASAN unknown-crash / READ of size 1 in my_strntoul_8bit upon INSERT .. SELECT
--
echo
#
SET
NAMES
latin1
;
CREATE
TABLE
t1
(
a
CHAR
);
CREATE
TABLE
t2
(
b
ENUM
(
'foo'
,
'bar'
));
INSERT
INTO
t1
VALUES
(
'1'
);
INSERT
INTO
t2
SELECT
*
FROM
t1
;
DROP
TABLE
t1
,
t2
;
--
echo
#
--
echo
# End of 10.0 tests
--
echo
#
strings/ctype-simple.c
View file @
75ceb6ff
...
...
@@ -454,7 +454,6 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
register
uint
cutlim
;
register
uint32
i
;
register
const
char
*
s
;
register
uchar
c
;
const
char
*
save
,
*
e
;
int
overflow
;
...
...
@@ -489,8 +488,9 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
overflow
=
0
;
i
=
0
;
for
(
c
=
*
s
;
s
!=
e
;
c
=
*
++
s
)
for
(
;
s
!=
e
;
++
s
)
{
register
uchar
c
=
*
s
;
if
(
c
>=
'0'
&&
c
<=
'9'
)
c
-=
'0'
;
else
if
(
c
>=
'A'
&&
c
<=
'Z'
)
...
...
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