diff options
author | Kristofer Pettersson <kristofer.pettersson@oracle.com> | 2011-09-06 09:42:14 +0200 |
---|---|---|
committer | Kristofer Pettersson <kristofer.pettersson@oracle.com> | 2011-09-06 09:42:14 +0200 |
commit | 39175b922504c8e459040657e48c89ea14256683 (patch) | |
tree | 0e8fc253abe87a09d09ce097fb1e7b993ebaac36 /mysql-test | |
parent | 3603b28da4911bc97c84c30a6ae4da6417ebf94e (diff) | |
download | mariadb-git-39175b922504c8e459040657e48c89ea14256683.tar.gz |
Bug11764310 - 57132: CONV FUNCTION CRASHES, NEGATIVE ARGUMENT TO MEMCPY
Failure to check the return state of a longlong2str() call
caused a crash. This could happen if a user executed the sql
function CONV() with certain parameters.
The patch fixes the issue by checking that the returned pointer
isn't NULL.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_str.result | 6 | ||||
-rw-r--r-- | mysql-test/t/func_str.test | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 81fe2413725..5a582f08829 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2785,5 +2785,11 @@ format(123,2,'no_NO') 123,00 DROP TABLE t1; # +# Bug#11764310 conv function crashes, negative argument to memcpy +# +SELECT CONV(1,-2147483648,-2147483648); +CONV(1,-2147483648,-2147483648) + +# # End of 5.5 tests # diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 9a9a8110a74..076c64e3ee1 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1437,5 +1437,10 @@ SELECT * FROM t1; DROP TABLE t1; --echo # +--echo # Bug#11764310 conv function crashes, negative argument to memcpy +--echo # +SELECT CONV(1,-2147483648,-2147483648); + +--echo # --echo # End of 5.5 tests --echo # |