diff options
author | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-24 12:08:04 +0100 |
---|---|---|
committer | Mattias Jonsson <mattias.jonsson@sun.com> | 2009-11-24 12:08:04 +0100 |
commit | f52280cc427eb6f8e6744fe7f89e5d23ec4e914b (patch) | |
tree | 2c29ceb5006df7d9f3b7ca72eff46ab876370d46 /sql/protocol.cc | |
parent | ca595821498d6a547fa1780df86cdf127b0019b3 (diff) | |
download | mariadb-git-f52280cc427eb6f8e6744fe7f89e5d23ec4e914b.tar.gz |
merge of bug#35765 into mysql-next-mr-bugfixing
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r-- | sql/protocol.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc index 5990f0f001a..ca6aa3a6052 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -411,8 +411,8 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err, thd->variables.character_set_results, err, strlen(err), system_charset_info, &error); - length= (uint) (strmake((char*) pos, (char*)converted_err, MYSQL_ERRMSG_SIZE) - - (char*) buff); + length= (uint) (strmake((char*) pos, (char*)converted_err, + MYSQL_ERRMSG_SIZE - 1) - (char*) buff); err= (char*) buff; DBUG_RETURN(net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) err, length)); |