From 597b6db8f2f67a852289e8815944fead7e265635 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 7 Sep 2012 19:36:18 +0200 Subject: [PATCH] luajit: fix filtering payload or pkt when not available yet --- src/detect-luajit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detect-luajit.c b/src/detect-luajit.c index 0f7ae63885..2912c77112 100644 --- a/src/detect-luajit.c +++ b/src/detect-luajit.c @@ -158,9 +158,9 @@ static int DetectLuajitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, if (tluajit == NULL) SCReturnInt(0); - if ((tluajit->flags & DATATYPE_PAYLOAD) && p->payload_len) + if ((tluajit->flags & DATATYPE_PAYLOAD) && p->payload_len == 0) SCReturnInt(0); - if ((tluajit->flags & DATATYPE_PACKET) && GET_PKT_LEN(p)) + if ((tluajit->flags & DATATYPE_PACKET) && GET_PKT_LEN(p) == 0) SCReturnInt(0); lua_getglobal(tluajit->luastate, "match");