Permalink
Browse files

sguil: fix crash when no Packet is in event.

A test to avoid ipv6 packet in sguil output was causing
a crash when the event was not containing a Packet.
  • Loading branch information...
1 parent 405761e commit 70517b92bb23287d646c804d8cae7c49acaa2060 @regit regit committed Oct 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/output-plugins/spo_sguil.c
@@ -237,7 +237,7 @@ void Sguil(Packet *p, void *event, uint32_t event_type, void *arg)
return;
}
- if ( p->ip6h != NULL )
+ if ( (p != NULL) && (p->ip6h != NULL) )
{
return;
}

0 comments on commit 70517b9

Please sign in to comment.