firnsy/barnyard2 — pull request #117 by topnotcher (2014-05-13 00:45:44+00:00)
Title: Fix a potential segfault in spo_syslog when p->iph == NULL

Line 1033 tests IPH_IS_VALID(p), i.e. p != NULL. When this fails,
execution jumps to line 1073. Then on lines 1077 and 1093:

if(protocol_names[GET_IPH_PROTO(p)])

GET_IPH_PROTO(p) attempts to dereference p->iph: p->iph->ip_proto

However, it is possible that execution jumped here because p->iph was
NULL, so we need to test p->iph first.