diff options
author | Alexander Barkov <bar@mysql.com> | 2010-11-19 18:24:29 +0300 |
---|---|---|
committer | Alexander Barkov <bar@mysql.com> | 2010-11-19 18:24:29 +0300 |
commit | 76ce2feb5fb5a280049c49becad3806cd58db5c3 (patch) | |
tree | efbe34819c43d94c8b3ea1f93af2d718e0dbb796 /mysql-test/t/xml.test | |
parent | e4361481436a800da0bf27e3298b8fa52a39b8ae (diff) | |
download | mariadb-git-76ce2feb5fb5a280049c49becad3806cd58db5c3.tar.gz |
Bug#58175 xml functions read initialized bytes when conversions happen
Problem:
nr_of_decimals could read behind the end of the buffer
in case of a non-null-terminated string, which caused
valgring warnings.
Fix:
fixing nr_of_decimals not to read behind the "end" pointer.
modified:
@ mysql-test/r/xml.result
@ mysql-test/t/xml.test
@ sql/item.cc
Diffstat (limited to 'mysql-test/t/xml.test')
-rw-r--r-- | mysql-test/t/xml.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index e9f137adf1b..4d5c5e1a91e 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -628,3 +628,18 @@ SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1)); --echo End of 5.1 tests + + +--echo # +--echo # Start of 5.5 tests +--echo # + +--echo # +--echo # Bug#58175 xml functions read initialized bytes when conversions happen +--echo # +SET NAMES latin1; +SELECT UPDATEXML(CONVERT('' USING swe7), TRUNCATE('',1), 0); + +--echo # +--echo # End of 5.5 tests +--echo # |