#include #include #include #include #include #include #include "flb_fuzz_header.h" /* A sample of configurations */ char conf_file[] = "# Parser: no_year\n" "# ===============\n" "# the given format don't contain the Year, this is a common\n" "# case on old Syslog implementations.\n" "#\n" "[PARSER]\n" " Name no_year\n" " Format json\n" " Time_Key time\n" " Time_Format %b %d %H:%M:%S\n" " Time_Keep On\n" "\n" "# Parser: no_year_N\n" "# =================\n" "# Just for compatibility, check a string with no year but including Nanoseconds.\n" "#\n" "[PARSER]\n" " Name no_year_N\n" " Format json\n" " Time_Key time\n" " Time_Format %b %d %H:%M:%S.%L\n" " Time_Keep On\n" "\n" "# Parser: no_year_NC\n" "# =================\n" "# Just for compatibility, check a string with no year but including Nanoseconds with comma as fractional separator.\n" "#\n" "[PARSER]\n" " Name no_year_NC\n" " Format json\n" " Time_Key time\n" " Time_Format %b %d %H:%M:%S,%L\n" " Time_Keep On\n" "\n" "# Parser: no_year_TZ\n" "# =================\n" "# Time string with no year and including timezone\n" "#\n" "[PARSER]\n" " Name no_year_TZ\n" " Format json\n" " Time_Key time\n" " Time_Format %b %d %H:%M:%S %z\n" " Time_Keep On\n" "\n" "# Parser: no_year_N_TZ\n" "# ====================\n" "# Time string with no year, nanoseconds and timezone\n" "#\n" "[PARSER]\n" " Name no_year_N_TZ\n" " Format json\n" " Time_Key time\n" " Time_Format %b %d %H:%M:%S.%L %z\n" " Time_Keep On\n" "\n" "\n" "# Parser: no_year_NC_TZ\n" "# ====================\n" "# Time string with no year, nanoseconds and timezone with comma as fractional separator.\n" "#\n" "[PARSER]\n" " Name no_year_NC_TZ\n" " Format json\n" " Time_Key time\n" " Time_Format %b %d %H:%M:%S,%L %z\n" " Time_Keep On\n" "\n" "\n" "# Parser: default_UTC\n" "# ===================\n" "# Time string with timezone in UTC\n" "#\n" "[PARSER]\n" " Name default_UTC\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S\n" " Time_Keep On\n" "\n" "# Parser: default_UTC_Z\n" "# =====================\n" "# Time string with timezone in UTC and ending Z\n" "#\n" "[PARSER]\n" " Name default_UTC_Z\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%SZ\n" " Time_Keep On\n" "\n" "# Parser: default_UTC_N_Z\n" "# =======================\n" "# Time string with timezone in UTC, nanoseconds and ending Z\n" "#\n" "[PARSER]\n" " Name default_UTC_N_Z\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S.%LZ\n" " Time_Keep On\n" "\n" "# Parser: default_UTC_NC_Z\n" "# =======================\n" "# Time string with timezone in UTC, nanoseconds with comma as fractional separator and ending Z\n" "#\n" "[PARSER]\n" " Name default_UTC_NC_Z\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S,%LZ\n" " Time_Keep On\n" "\n" "# Parser: generic_TZ\n" "# ==================\n" "# Generic date with timezone\n" "#\n" "[PARSER]\n" " Name generic_TZ\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S %z\n" " Time_Keep On\n" "\n" "# Parser: generic\n" "# ===============\n" "# Generic date\n" "#\n" "[PARSER]\n" " Name generic\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S\n" " Time_Keep On\n" "\n" "# Parser: generic_N\n" "# ===============\n" "# Generic date with nanoseconds\n" "#\n" "[PARSER]\n" " Name generic_N\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S.%L\n" " Time_Keep On\n" "\n" "# Parser: generic_NC\n" "# ===============\n" "# Generic date with nanoseconds with comma as fractional separator\n" "#\n" "[PARSER]\n" " Name generic_NC\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S,%L\n" " Time_Keep On\n" "\n" "# Parser: generic_N_TZ\n" "# ====================\n" "# Generic date with nanoseconds and timezone\n" "#\n" "[PARSER]\n" " Name generic_N_TZ\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S.%L %z\n" " Time_Keep On\n" "\n" "# Parser: generic_NC_TZ\n" "# ====================\n" "# Generic date with nanoseconds with comma as fractional separator and timezone\n" "#\n" "[PARSER]\n" " Name generic_NC_TZ\n" " Format json\n" " Time_Key time\n" " Time_Format %m/%d/%Y %H:%M:%S,%L %z\n" " Time_Keep On\n" "\n" "# Parser: apache_error\n" "# ====================\n" "# Apache error log time format\n" "#\n" "[PARSER]\n" " Name apache_error\n" " Format json\n" " Time_Key time\n" " Time_Format %a %b %d %H:%M:%S.%L %Y\n" " Time_Keep On\n" "# Parser: mysql_quoted_stuff\n" "# ====================\n" "# Apache error log time format\n" "#\n" "[PARSER]\n" " Name mysql_quoted_stuff\n" " Format regex\n" " Regex ^(?