summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-11-25 10:37:13 +0100
committerMattias Jonsson <mattias.jonsson@sun.com>2009-11-25 10:37:13 +0100
commit72a26125e21fc4c654a8a1c9c1841f79f62d4d7a (patch)
treeb4d0c06710c6c673b5fabd60caa973c24dc58a4f /sql/protocol.cc
parentad03b65d6fe143f07bc66d689cf0a0be451e19e5 (diff)
parentedaae7c3e2b8809931a62eff04de55674a6a1f7a (diff)
downloadmariadb-git-72a26125e21fc4c654a8a1c9c1841f79f62d4d7a.tar.gz
merge
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc4
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));