From ac60f32197bb09fca134d771d75e2403e33c096c Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 25 Aug 2008 00:53:53 +0200 Subject: [PATCH] Make nocase keyword initilization failure fatal and slightly improve the error message it prints. --- src/detect-nocase.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/detect-nocase.c b/src/detect-nocase.c index 3f33a20a54..47db71d5c6 100644 --- a/src/detect-nocase.c +++ b/src/detect-nocase.c @@ -47,10 +47,12 @@ int DetectNocaseSetup (Signature *s, SigMatch *m, char *nullstr) //printf("DetectNocaseSetup: set nocase for previous content\n"); cd->flags |= DETECT_URICONTENT_NOCASE; } else { - printf("DetectNocaseSetup: Unknown previous keyword!\n"); + printf("DetectNocaseSetup: Unknown previous keyword! (type %u)\n", pm->type); + return -1; } } else { - printf("DetectNocaseSetup: No previous match!\n"); + printf("DetectNocaseSetup: No previous match! (pm == NULL)\n"); + return -1; } return 0;