diff options
author | Monty <monty@mariadb.org> | 2021-03-22 17:53:39 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2021-03-22 17:54:29 +0200 |
commit | d902b53cfe365ea76b79c31b48f655191fcc994e (patch) | |
tree | 2702362daacf52a7b402e1c1f96634b8c3236843 /sql | |
parent | cebf9ee2040195a61fbed32d06cc2e335e9f8dfd (diff) | |
download | mariadb-git-d902b53cfe365ea76b79c31b48f655191fcc994e.tar.gz |
Fixed wrong usage strlen(), should be sizeof()
Found by running valgrind on mtr tests
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_prepare.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 33ced717ab9..2cda1241a35 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -3419,7 +3419,7 @@ static void mysql_stmt_execute_common(THD *thd, Set thd->query_string with the stmt_id so the audit plugin gets the meaningful notification. */ - if (alloc_query(thd, llbuf, strlen(llbuf))) + if (alloc_query(thd, llbuf, sizeof(llbuf))) thd->set_query(0, 0); my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), static_cast<int>(sizeof(llbuf)), llstr(stmt_id, llbuf), "mysqld_stmt_execute"); |