File tree 1 file changed +6
-2
lines changed
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)
8013
8013
return 0 ;
8014
8014
}
8015
8015
8016
+ if (unlikely (tcpclient -> recvbuff .size < 0 )) {
8017
+ BUG ("recv buffer size is invalid." );
8018
+ }
8019
+
8016
8020
len = _dns_server_tcp_socket_recv (tcpclient , tcpclient -> recvbuff .buf + tcpclient -> recvbuff .size ,
8017
8021
sizeof (tcpclient -> recvbuff .buf ) - tcpclient -> recvbuff .size );
8018
8022
if (len < 0 ) {
@@ -8066,7 +8070,7 @@ static int _dns_server_tcp_process_one_request(struct dns_server_conn_tcp_client
8066
8070
goto out ;
8067
8071
}
8068
8072
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 );
8070
8074
if (len < 0 ) {
8071
8075
if (len == -1 ) {
8072
8076
ret = 0 ;
@@ -8155,7 +8159,7 @@ static int _dns_server_tcp_process_one_request(struct dns_server_conn_tcp_client
8155
8159
request_len = ntohs (* ((unsigned short * )(request_data )));
8156
8160
8157
8161
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 );
8159
8163
goto errout ;
8160
8164
}
8161
8165
You can’t perform that action at this time.
0 commit comments