| 1000 | } |
| 1001 | |
| 1002 | int hb_validate_param_string(const char *regex_pattern, const char *param_string) |
| 1003 | { |
| 1004 | regex_t regex_temp; |
| 1005 | |
| 1006 | if (regcomp(®ex_temp, regex_pattern, REG_EXTENDED|REG_ICASE) == 0) |
| 1007 | { |
| 1008 | if (regexec(®ex_temp, param_string, 0, NULL, 0) == 0) |
| 1009 | { |
| 1010 | regfree(®ex_temp); |
| 1011 | return 0; |
| 1012 | } |
| 1013 | } |
| 1014 | else |
| 1015 | { |
| 1016 | hb_log("hb_validate_param_string: Error compiling regex for pattern (%s).\n", param_string); |
| 1017 | } |
| 1018 | |
| 1019 | regfree(®ex_temp); |
| 1020 | return 1; |
| 1021 | } |
| 1022 | |
| 1023 | int hb_validate_filter_settings(int filter_id, const hb_dict_t * settings) |
| 1024 | { |
no test coverage detected