From c3392b7c226daf6dd8713a6a6529a92492f910ff Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 5 May 2010 15:12:50 +0200 Subject: [PATCH] Fix checking for the stream GAP after the ssn ptr was initialized. --- src/app-layer-parser.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 1a196178c7..7d2ccc7567 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -706,15 +706,16 @@ int AppLayerParse(Flow *f, uint8_t proto, uint8_t flags, uint8_t *input, uint16_t parser_idx = 0; AppLayerProto *p = &al_proto_table[proto]; + TcpSession *ssn = NULL; - if (flags & STREAM_GAP) { - SCLogDebug("stream gap detected (missing packets), this is not yet supported."); + ssn = f->protoctx; + if (ssn == NULL) { + SCLogDebug("no TCP session"); goto error; } - TcpSession *ssn = f->protoctx; - if (ssn == NULL) { - SCLogDebug("no TCP session"); + if (flags & STREAM_GAP) { + SCLogDebug("stream gap detected (missing packets), this is not yet supported."); goto error; }