From 0fd71c45c54376ebe88c7a90fa855859cb932d0b Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 2 Nov 2011 09:49:06 +0100 Subject: [PATCH] Improve asn1 keyword handling of a malformed asn1 state. --- src/detect-asn1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-asn1.c b/src/detect-asn1.c index b7cee9f0d8..12eb109718 100644 --- a/src/detect-asn1.c +++ b/src/detect-asn1.c @@ -165,7 +165,7 @@ int DetectAsn1Match(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p, /* Ok, now we have all the data. Let's check the nodes */ - if (ac->cur_frame > 0 || ac->asn1_stack[0]->id.ptr != NULL) { + if (ac->cur_frame > 0 || (ac->asn1_stack[0] != NULL && ac->asn1_stack[0]->id.ptr != NULL)) { /* We spect at least one node */ uint16_t n_iter = 0; ret = 0;