mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Add checks to avoid improper negative values use.
This commit is contained in:
parent
a3b963ad4e
commit
a316878d01
12 changed files with 89 additions and 62 deletions
|
@ -1102,11 +1102,8 @@ void TCP_Analyzer::FlipRoles()
|
|||
|
||||
void TCP_Analyzer::UpdateConnVal(RecordVal *conn_val)
|
||||
{
|
||||
int orig_endp_idx = connection_type->FieldOffset("orig");
|
||||
int resp_endp_idx = connection_type->FieldOffset("resp");
|
||||
|
||||
RecordVal *orig_endp_val = conn_val->Lookup(orig_endp_idx)->AsRecordVal();
|
||||
RecordVal *resp_endp_val = conn_val->Lookup(resp_endp_idx)->AsRecordVal();
|
||||
RecordVal *orig_endp_val = conn_val->Lookup("orig")->AsRecordVal();
|
||||
RecordVal *resp_endp_val = conn_val->Lookup("resp")->AsRecordVal();
|
||||
|
||||
orig_endp_val->Assign(0, new Val(orig->Size(), TYPE_COUNT));
|
||||
orig_endp_val->Assign(1, new Val(int(orig->state), TYPE_COUNT));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue