mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix for portmapper analyzer segfaulting when parsing portmap dump
replies. (Gregor Maier) Closes #332.
This commit is contained in:
parent
f228e32679
commit
06bd8baef6
2 changed files with 5 additions and 0 deletions
|
@ -79,6 +79,10 @@ function PortmapBuildDumpVal(params: PortmapDumpResults): BroVal
|
|||
|
||||
for ( int i = 0; i < params->size(); ++i )
|
||||
{
|
||||
// The last element has cont()!=1 and this element doesn't contain a
|
||||
// mapping.
|
||||
if ((*params)[i]->cont() != 1)
|
||||
continue;
|
||||
Val* m = PortmapBuildMappingVal((*params)[i]->mapping());
|
||||
Val* index = new Val(i + 1, TYPE_COUNT);
|
||||
mappings->Assign(index, m);
|
||||
|
|
|
@ -68,6 +68,7 @@ type PortmapDumpEntry = record {
|
|||
};
|
||||
};
|
||||
|
||||
# The final element that has cont!=1 will be included in the array.
|
||||
type PortmapDumpResults = PortmapDumpEntry[] &until($element.cont != 1);
|
||||
|
||||
type PortmapCallItResults = record {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue