ICMP.cc (zeek-3.2.2) | : | ICMP.cc (zeek-3.2.4) | ||
---|---|---|---|---|
skipping to change at line 756 | skipping to change at line 756 | |||
while ( caplen > 0 ) | while ( caplen > 0 ) | |||
{ | { | |||
// Must have at least type & length to continue parsing options. | // Must have at least type & length to continue parsing options. | |||
if ( caplen < 2 ) | if ( caplen < 2 ) | |||
{ | { | |||
Weird("truncated_ICMPv6_ND_options"); | Weird("truncated_ICMPv6_ND_options"); | |||
break; | break; | |||
} | } | |||
uint8_t type = *((const uint8_t*)data); | uint8_t type = *((const uint8_t*)data); | |||
uint8_t length = *((const uint8_t*)(data + 1)); | uint16_t length = *((const uint8_t*)(data + 1)); | |||
if ( length == 0 ) | if ( length == 0 ) | |||
{ | { | |||
Weird("zero_length_ICMPv6_ND_option"); | Weird("zero_length_ICMPv6_ND_option"); | |||
break; | break; | |||
} | } | |||
auto rv = zeek::make_intrusive<zeek::RecordVal>(icmp6_nd_option_t ype); | auto rv = zeek::make_intrusive<zeek::RecordVal>(icmp6_nd_option_t ype); | |||
rv->Assign(0, zeek::val_mgr->Count(type)); | rv->Assign(0, zeek::val_mgr->Count(type)); | |||
rv->Assign(1, zeek::val_mgr->Count(length)); | rv->Assign(1, zeek::val_mgr->Count(length)); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |