{
uint32_t hash = SCACBSInitHashRaw(pat, patlen);
- if (ctx->init_hash[hash] == NULL) {
+ if (ctx->init_hash == NULL || ctx->init_hash[hash] == NULL) {
return NULL;
}
{
uint32_t hash = SCACBSInitHash(p);
+ if (ctx->init_hash == NULL) {
+ return 0;
+ }
+
if (ctx->init_hash[hash] == NULL) {
ctx->init_hash[hash] = p;
return 0;
{
SCACBSCtx *ctx = (SCACBSCtx *)mpm_ctx->ctx;
- if (mpm_ctx->pattern_cnt == 0) {
+ if (mpm_ctx->pattern_cnt == 0 || ctx->init_hash == NULL) {
SCLogDebug("no patterns supplied to this mpm_ctx");
return 0;
}
{
uint32_t hash = SCACGfbsInitHashRaw(pat, patlen);
- if (ctx->init_hash[hash] == NULL) {
+ if (ctx->init_hash == NULL || ctx->init_hash[hash] == NULL) {
return NULL;
}
{
uint32_t hash = SCACGfbsInitHash(p);
+ if (ctx->init_hash == NULL) {
+ return 0;
+ }
+
if (ctx->init_hash[hash] == NULL) {
ctx->init_hash[hash] = p;
return 0;
{
SCACGfbsCtx *ctx = (SCACGfbsCtx *)mpm_ctx->ctx;
- if (mpm_ctx->pattern_cnt == 0) {
+ if (mpm_ctx->pattern_cnt == 0 || ctx->init_hash == NULL) {
SCLogDebug("No patterns supplied to this mpm_ctx");
return 0;
}
{
uint32_t hash = SCACInitHashRaw(pat, patlen);
- if (ctx->init_hash[hash] == NULL) {
+ if (ctx->init_hash == NULL || ctx->init_hash[hash] == NULL) {
return NULL;
}
{
uint32_t hash = SCACInitHash(p);
+ if (ctx->init_hash == NULL) {
+ return 0;
+ }
+
if (ctx->init_hash[hash] == NULL) {
ctx->init_hash[hash] = p;
return 0;
{
SCACCtx *ctx = (SCACCtx *)mpm_ctx->ctx;
- if (mpm_ctx->pattern_cnt == 0) {
+ if (mpm_ctx->pattern_cnt == 0 || ctx->init_hash == NULL) {
SCLogDebug("no patterns supplied to this mpm_ctx");
return 0;
}