From 8d9cd60fa86929e2fb7584af3ae16c78d09beb2c Mon Sep 17 00:00:00 2001 From: Johanna Amann Date: Thu, 14 Jul 2016 14:33:12 -0700 Subject: [PATCH] SSL: Fix ref/unref problem. VectorType unref'd the Record type we used during construction, apparently leading to it not being present anymore at some point of time. Fix this problem by doing it just like all other analyzers. --- src/analyzer/protocol/ssl/tls-handshake-analyzer.pac | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/analyzer/protocol/ssl/tls-handshake-analyzer.pac b/src/analyzer/protocol/ssl/tls-handshake-analyzer.pac index 092ad5b59f..b4edf60d78 100644 --- a/src/analyzer/protocol/ssl/tls-handshake-analyzer.pac +++ b/src/analyzer/protocol/ssl/tls-handshake-analyzer.pac @@ -104,17 +104,13 @@ refine connection Handshake_Conn += { function proc_signature_algorithm(rec: HandshakeRecord, supported_signature_algorithms: SignatureAndHashAlgorithm[]) : bool %{ - RecordType* rt = BifType::Record::SSL::SignatureAndHashAlgorithm; - VectorType* vt = new VectorType(rt); - - VectorVal* slist = new VectorVal(vt); - Unref(vt); // not consumed, VectorVal refs. + VectorVal* slist = new VectorVal(internal_type("signature_and_hashalgorithm_vec")->AsVectorType()); if ( supported_signature_algorithms ) { for ( unsigned int i = 0; i < supported_signature_algorithms->size(); ++i ) { - RecordVal* el = new RecordVal(rt); + RecordVal* el = new RecordVal(BifType::Record::SSL::SignatureAndHashAlgorithm); el->Assign(0, new Val((*supported_signature_algorithms)[i]->HashAlgorithm(), TYPE_COUNT)); el->Assign(1, new Val((*supported_signature_algorithms)[i]->SignatureAlgorithm(), TYPE_COUNT)); slist->Assign(i, el);