From 39175b922504c8e459040657e48c89ea14256683 Mon Sep 17 00:00:00 2001 From: Kristofer Pettersson Date: Tue, 6 Sep 2011 09:42:14 +0200 Subject: 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. --- mysql-test/t/func_str.test | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mysql-test/t/func_str.test') 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 @@ -1436,6 +1436,11 @@ SHOW CREATE TABLE t1; 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 # -- cgit v1.2.1