mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 05:05:33 +02:00
Bug#44358 valgrind errors with decode() function
The warning happens because string argument is not zero ended. The fix is to add new parameter 'length' to SQL_CRYPT() and use ptr() instead of c_ptr(). mysql-test/r/func_str.result: test result mysql-test/t/func_str.test: test case sql/item_strfunc.cc: Added new parameter 'length' to SQL_CRYPT sql/sql_crypt.cc: Added new parameter 'length' to SQL_CRYPT sql/sql_crypt.h: Added new parameter 'length' to SQL_CRYPT
This commit is contained in:
parent
e0526914b6
commit
5f9e40a5f8
5 changed files with 31 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ class SQL_CRYPT :public Sql_alloc
|
|||
uint shift;
|
||||
void crypt_init(ulong *seed);
|
||||
public:
|
||||
SQL_CRYPT(const char *seed);
|
||||
SQL_CRYPT(const char *seed, uint length);
|
||||
SQL_CRYPT(ulong *seed)
|
||||
{
|
||||
crypt_init(seed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue