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
ddfa722a
Commit
ddfa722a
authored
Mar 14, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-18626 ASAN stack-buffer-overflow in int10_to_str / make_date_time upon DATE_FORMAT
parent
49c49e63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+6
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+7
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+1
-1
No files found.
mysql-test/r/func_time.result
View file @
ddfa722a
...
...
@@ -3444,5 +3444,11 @@ foo
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '2012-12-12 12:12:12'
#
# MDEV-18626 ASAN stack-buffer-overflow in int10_to_str / make_date_time upon DATE_FORMAT
#
SELECT DATE_FORMAT(100000000000, '%j');
DATE_FORMAT(100000000000, '%j')
NULL
#
# End of 10.1 tests
#
mysql-test/t/func_time.test
View file @
ddfa722a
...
...
@@ -1929,6 +1929,13 @@ DROP TABLE t1;
SELECT
NULLIF
(
'foo'
,
FROM_UNIXTIME
(
'2012-12-12 12:12:12'
,
TRIM
(
0
)));
--
echo
#
--
echo
# MDEV-18626 ASAN stack-buffer-overflow in int10_to_str / make_date_time upon DATE_FORMAT
--
echo
#
SELECT
DATE_FORMAT
(
100000000000
,
'%j'
);
--
echo
#
--
echo
# End of 10.1 tests
--
echo
#
sql/item_timefunc.cc
View file @
ddfa722a
...
...
@@ -577,7 +577,7 @@ static bool make_date_time(const LEX_CSTRING &format, MYSQL_TIME *l_time,
str
->
append_with_prefill
(
intbuff
,
length
,
2
,
'0'
);
break
;
case
'j'
:
if
(
type
==
MYSQL_TIMESTAMP_TIME
)
if
(
type
==
MYSQL_TIMESTAMP_TIME
||
!
l_time
->
month
||
!
l_time
->
year
)
return
1
;
length
=
(
uint
)
(
int10_to_str
(
calc_daynr
(
l_time
->
year
,
l_time
->
month
,
l_time
->
day
)
-
...
...
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