summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--grammar/rainerscript.c4
-rw-r--r--runtime/ruleset.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index 30600ea3..d588ccc9 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -1609,13 +1609,15 @@ struct cnfstmt *
cnfstmtNewPROPFILT(char *propfilt, struct cnfstmt *t_then)
{
struct cnfstmt* cnfstmt;
+ rsRetVal lRet;
if((cnfstmt = cnfstmtNew(S_PROPFILT)) != NULL) {
cnfstmt->printable = (uchar*)propfilt;
cnfstmt->d.s_propfilt.t_then = t_then;
cnfstmt->d.s_propfilt.propName = NULL;
cnfstmt->d.s_propfilt.regex_cache = NULL;
cnfstmt->d.s_propfilt.pCSCompValue = NULL;
- DecodePropFilter((uchar*)propfilt, cnfstmt);
+ lRet = DecodePropFilter((uchar*)propfilt, cnfstmt);
+dbgprintf("AAAA: DecodePropFilter returns %d\n", lRet);
}
return cnfstmt;
}
diff --git a/runtime/ruleset.c b/runtime/ruleset.c
index 7b53fe3b..8310e70d 100644
--- a/runtime/ruleset.c
+++ b/runtime/ruleset.c
@@ -318,6 +318,9 @@ evalPROPFILT(struct cnfstmt *stmt, msg_t *pMsg)
int bRet = 0;
size_t propLen;
+ if(stmt->d.s_propfilt.propID == PROP_INVALID)
+ goto done;
+
pszPropVal = MsgGetProp(pMsg, NULL, stmt->d.s_propfilt.propID,
stmt->d.s_propfilt.propName, &propLen, &pbMustBeFreed);
@@ -390,6 +393,7 @@ evalPROPFILT(struct cnfstmt *stmt, msg_t *pMsg)
/* cleanup */
if(pbMustBeFreed)
free(pszPropVal);
+done:
return bRet;
}