|
|
@ -41,13 +41,13 @@ int DetectOffsetSetup (DetectEngineCtx *de_ctx, Signature *s, SigMatch *m, char
|
|
|
|
* SigMatch (it can be the same as this one) */
|
|
|
|
* SigMatch (it can be the same as this one) */
|
|
|
|
SigMatch *pm = DetectContentFindPrevApplicableSM(m);
|
|
|
|
SigMatch *pm = DetectContentFindPrevApplicableSM(m);
|
|
|
|
if (pm == NULL) {
|
|
|
|
if (pm == NULL) {
|
|
|
|
printf("DetectOffsetSetup: Unknown previous keyword!\n");
|
|
|
|
SCLogError(SC_ERR_OFFSET_MISSING_CONTENT, "offset needs a preceeding content option");
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DetectContentData *cd = (DetectContentData *)pm->ctx;
|
|
|
|
DetectContentData *cd = (DetectContentData *)pm->ctx;
|
|
|
|
if (cd == NULL) {
|
|
|
|
if (cd == NULL) {
|
|
|
|
printf("DetectOffsetSetup: Unknown previous keyword!\n");
|
|
|
|
SCLogError(SC_INVALID_ARGUMENT, "invalid argument");
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|