BugFix: tcp server process failed

This commit is contained in:
Nick Peng
2019-12-28 21:57:56 +08:00
parent ba9fbc981f
commit 198d18f18a
2 changed files with 12 additions and 5 deletions

View File

@@ -2501,7 +2501,7 @@ static int _dns_server_tcp_process_one_request(struct dns_server_conn_tcp_client
return RECV_ERROR_FAIL;
}
if (request_len > (total_len - proceed_len)) {
if (request_len > (total_len - proceed_len - sizeof(unsigned short))) {
ret = RECV_ERROR_AGAIN;
break;
}