From: Russ Combs Date: Fri, 31 Oct 2014 20:57:48 +0000 (-0400) Subject: fixed classtype segfault on ctor after parse error X-Git-Tag: 3.0.0-233~1288^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0589828dfdafcc2a088702db11f7b2f8a13a745;p=thirdparty%2Fsnort3.git fixed classtype segfault on ctor after parse error --- diff --git a/ChangeLog b/ChangeLog index 2c93982d4..38cd76606 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ -- tweaks from Josh -- tweaked inspector execution -- fixed parsing of reference with \; +-- fixed ips classtype segfault on ctor after parse error 126 -- pulled latest from tom diff --git a/src/ips_options/ips_classtype.cc b/src/ips_options/ips_classtype.cc index 48272c5be..390e2e96f 100644 --- a/src/ips_options/ips_classtype.cc +++ b/src/ips_options/ips_classtype.cc @@ -89,8 +89,12 @@ static IpsOption* classtype_ctor(Module* p, OptTreeNode* otn) { ClassTypeModule* m = (ClassTypeModule*)p; otn->sigInfo.classType = m->type; - otn->sigInfo.class_id = m->type->id; - otn->sigInfo.priority = m->type->priority; + + if ( m->type ) + { + otn->sigInfo.class_id = m->type->id; + otn->sigInfo.priority = m->type->priority; + } return nullptr; }