summaryrefslogtreecommitdiff
path: root/sql/net_serv.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-11-09 10:20:09 +0200
committerMichael Widenius <monty@askmonty.org>2010-11-09 10:20:09 +0200
commitaa34668f643e78cf754bee88f48236f944d7b722 (patch)
treef4f4791b3771bd6f629cdc7668897602b58dd021 /sql/net_serv.cc
parent9e008bd7261028cdac77ef995c68cba749e473e3 (diff)
parent7b047a31a09a7999353232cb6407b4e6338d5b70 (diff)
downloadmariadb-git-aa34668f643e78cf754bee88f48236f944d7b722.tar.gz
automatic merge
Diffstat (limited to 'sql/net_serv.cc')
-rw-r--r--sql/net_serv.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 4796a5601bf..6a4079b1fef 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -116,7 +116,7 @@ my_bool my_net_init(NET *net, Vio* vio)
net->vio = vio;
my_net_local_init(net); /* Set some limits */
if (!(net->buff=(uchar*) my_malloc((size_t) net->max_packet+
- NET_HEADER_SIZE + COMP_HEADER_SIZE,
+ NET_HEADER_SIZE + COMP_HEADER_SIZE +1,
MYF(MY_WME))))
DBUG_RETURN(1);
net->buff_end=net->buff+net->max_packet;
@@ -580,7 +580,7 @@ net_real_write(NET *net,const uchar *packet, size_t len)
uchar *b;
uint header_length=NET_HEADER_SIZE+COMP_HEADER_SIZE;
if (!(b= (uchar*) my_malloc(len + NET_HEADER_SIZE +
- COMP_HEADER_SIZE, MYF(MY_WME))))
+ COMP_HEADER_SIZE + 1, MYF(MY_WME))))
{
net->error= 2;
net->last_errno= ER_OUT_OF_RESOURCES;