fix invalid packet
This commit is contained in:
parent
50dfc57cda
commit
5ff8bb5bc0
|
@ -128,10 +128,10 @@ int transDumpFromBuffer(SConnBuffer* connBuf, char** buf) {
|
|||
static const int HEADSIZE = sizeof(STransMsgHead);
|
||||
|
||||
SConnBuffer* p = connBuf;
|
||||
if (p->left != 0) {
|
||||
if (p->left != 0 || p->total <= 0) {
|
||||
return -1;
|
||||
}
|
||||
int total = connBuf->total;
|
||||
int total = p->total;
|
||||
if (total >= HEADSIZE && !p->invalid) {
|
||||
*buf = taosMemoryCalloc(1, total);
|
||||
memcpy(*buf, p->buf, total);
|
||||
|
|
Loading…
Reference in New Issue