1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-17 01:02:23 +03:00

Fixed a mem alloc bug in readtask

This commit is contained in:
Patrick LeBlanc
2019-02-05 12:56:42 -06:00
parent 22f16dc681
commit ca1f08e4aa

View File

@@ -23,7 +23,7 @@ ReadTask::~ReadTask()
return ret; \
}
#define min(x, y) (x < y ? x : y)
#define max(x, y) (x > y ? x : y)
bool ReadTask::run()
{
@@ -42,7 +42,7 @@ bool ReadTask::run()
// read from IOC, write to the socket
vector<uint8_t> outbuf;
outbuf.resize(min(cmd->count, 4) + sizeof(sm_msg_resp));
outbuf.resize(max(cmd->count, 4) + sizeof(sm_msg_resp));
sm_msg_resp *resp = (sm_msg_resp *) &outbuf[0];
resp->type = SM_MSG_START;