Skip to content

Commit

Permalink
WIP Draft
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucovsky committed Apr 17, 2024
1 parent c305ed1 commit 738edda
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/detect-content.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,20 @@ void SigParseRequiredContentSize(
continue;
}
}
SCLogDebug("content_len %d; distance: %d, offset: %d, depth: %d", cd->content_len,
cd->distance, cd->offset, cd->depth);
total_len += cd->content_len + cd->distance;
max_offset = MAX(max_offset, cd->offset);
first = false;
if (!(cd->flags & DETECT_CONTENT_NEGATED)) {
SCLogDebug("content_len %d; distance: %d, offset: %d, depth: %d", cd->content_len,
cd->distance, cd->offset, cd->depth);
total_len += cd->content_len + cd->distance;
max_offset = MAX(max_offset, cd->offset);
first = false;
}
#if 0
else {
if (max_size < cd->content_len) {
SCLogNotice("Useless content section \"%s\" [length %d]", cd->content, cd->content_len);
}
}
#endif
}

*len = total_len;
Expand Down

0 comments on commit 738edda

Please sign in to comment.