File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -8013,6 +8013,10 @@ static int _dns_server_tcp_recv(struct dns_server_conn_tcp_client *tcpclient)
80138013 return 0 ;
80148014 }
80158015
8016+ if (unlikely (tcpclient -> recvbuff .size < 0 )) {
8017+ BUG ("recv buffer size is invalid." );
8018+ }
8019+
80168020 len = _dns_server_tcp_socket_recv (tcpclient , tcpclient -> recvbuff .buf + tcpclient -> recvbuff .size ,
80178021 sizeof (tcpclient -> recvbuff .buf ) - tcpclient -> recvbuff .size );
80188022 if (len < 0 ) {
@@ -8066,7 +8070,7 @@ static int _dns_server_tcp_process_one_request(struct dns_server_conn_tcp_client
80668070 goto out ;
80678071 }
80688072
8069- len = http_head_parse (http_head , tcpclient -> recvbuff .buf , tcpclient -> recvbuff .size );
8073+ len = http_head_parse (http_head , tcpclient -> recvbuff .buf + proceed_len , tcpclient -> recvbuff .size );
80708074 if (len < 0 ) {
80718075 if (len == -1 ) {
80728076 ret = 0 ;
@@ -8155,7 +8159,7 @@ static int _dns_server_tcp_process_one_request(struct dns_server_conn_tcp_client
81558159 request_len = ntohs (* ((unsigned short * )(request_data )));
81568160
81578161 if (request_len >= sizeof (tcpclient -> recvbuff .buf )) {
8158- tlog (TLOG_DEBUG , "request length is invalid." );
8162+ tlog (TLOG_DEBUG , "request length is invalid. len = %d" , request_len );
81598163 goto errout ;
81608164 }
81618165
You can’t perform that action at this time.
0 commit comments