diff options
author | Monty <monty@mariadb.org> | 2018-01-19 19:56:34 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-01-30 21:33:56 +0200 |
commit | 486c86dd391546fcd181cf4767768b2ee4986ef2 (patch) | |
tree | f9090e39c73b4aed58b3c063e9c23880338c167f /sql/sp.cc | |
parent | f55dc7f733446a201e3b465ae03a0388d192a3ad (diff) | |
download | mariadb-git-486c86dd391546fcd181cf4767768b2ee4986ef2.tar.gz |
Added some checking that LEX_CSTRING is \0 terminated
- When adding LEX_CSTRING to String, we are now checking that
string is \0 terminated (as normally LEX_CSTRING should be
usable for printf(). In the cases when one wants to avoid the
checking one can use String->append(ptr, length) instead of just
String->append(LEX_CSTRING*)
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 56d6a8ed261..72257a4a332 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -2328,7 +2328,7 @@ Sp_handler::show_create_sp(THD *thd, String *buf, buf->append(STRING_WITH_LEN(" DETERMINISTIC\n")); append_suid(buf, chistics.suid); append_comment(buf, chistics.comment); - buf->append(&body); + buf->append(body.str, body.length); // Not \0 terminated thd->variables.sql_mode= old_sql_mode; return false; } |