This is to make sure the files buffers are properly managed even
when there are no rules or when there are no file.data rules.
Bug: #5703.
g_file_data_buffer_id = DetectBufferTypeGetByName("file_data");
}
-#define FILEDATA_CONTENT_LIMIT 100000
-#define FILEDATA_CONTENT_INSPECT_MIN_SIZE 32768
-#define FILEDATA_CONTENT_INSPECT_WINDOW 4096
-
static void SetupDetectEngineConfig(DetectEngineCtx *de_ctx) {
if (de_ctx->filedata_config_initialized)
return;
FileContainerAdd(ffc, ff);
+ /* set default window and min inspection size */
+ FileSetInspectSizes(ff, FILEDATA_CONTENT_INSPECT_WINDOW, FILEDATA_CONTENT_INSPECT_MIN_SIZE);
+
ff->size += data_len;
if (data != NULL) {
if (AppendData(ff, data, data_len) != 0) {
// to be used instead of PATH_MAX which depends on the OS
#define SC_FILENAME_MAX 4096
+#define FILEDATA_CONTENT_LIMIT 100000
+#define FILEDATA_CONTENT_INSPECT_MIN_SIZE 32768
+#define FILEDATA_CONTENT_INSPECT_WINDOW 4096
+
typedef enum FileState_ {
FILE_STATE_NONE = 0, /**< no state */
FILE_STATE_OPENED, /**< flow file is opened */