mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
analyzer/protocol/dns: change runtime check to assert()
If it were legal to call SendReplyOrRejectEvent() without an EventHandlerPtr, then this would leak the `question_name` object. But this method has just one caller, and it verifies the EventHandlerPtr.
This commit is contained in:
parent
dd377fffba
commit
aac3de576f
1 changed files with 9 additions and 8 deletions
|
@ -1415,14 +1415,15 @@ void DNS_Interpreter::SendReplyOrRejectEvent(DNS_MsgInfo* msg,
|
||||||
RR_Type qtype = RR_Type(ExtractShort(data, len));
|
RR_Type qtype = RR_Type(ExtractShort(data, len));
|
||||||
int qclass = ExtractShort(data, len);
|
int qclass = ExtractShort(data, len);
|
||||||
|
|
||||||
if ( event )
|
assert(event);
|
||||||
analyzer->ConnectionEventFast(event, {
|
|
||||||
analyzer->BuildConnVal(),
|
analyzer->ConnectionEventFast(event, {
|
||||||
msg->BuildHdrVal(),
|
analyzer->BuildConnVal(),
|
||||||
new StringVal(question_name),
|
msg->BuildHdrVal(),
|
||||||
val_mgr->GetCount(qtype),
|
new StringVal(question_name),
|
||||||
val_mgr->GetCount(qclass),
|
val_mgr->GetCount(qtype),
|
||||||
});
|
val_mgr->GetCount(qclass),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue