1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Hedge against runaway recursion. See #3130

This commit is contained in:
dmiller
2025-06-30 23:33:31 +00:00
parent f5a9b18a40
commit 3d36f2b005

View File

@@ -500,8 +500,6 @@ static void write_evt_handler(nsock_pool nsp, nsock_event evt, void *req_v) {
info record;
request *req = (request *) req_v;
req->curr_server->write_busy = 0;
if (nse_status(evt) == NSE_STATUS_SUCCESS) {
req->curr_server->in_process.push_front(req);
record.tpreq = req;
@@ -516,6 +514,9 @@ static void write_evt_handler(nsock_pool nsp, nsock_event evt, void *req_v) {
req->curr_server->to_process.push_front(req);
}
// Avoid runaway recursion: when we call do_possible_writes above,
// make sure we still are "busy"
req->curr_server->write_busy = 0;
}
static DNS::RECORD_TYPE wire_type(DNS::RECORD_TYPE t) {