mirror of
https://github.com/yrutschle/sslh.git
synced 2025-06-01 08:01:19 +03:00
Use REG_EXTENDED for regex matching
The "7 regex" manual page called 'Basic' regular expressions "Obsolete". It also matches the pcre expressions slightly better.
This commit is contained in:
parent
2a7bafdd7f
commit
338daafe87
@ -212,7 +212,7 @@ static void setup_regex_probe(struct proto *p, config_setting_t* probes)
|
|||||||
for (i = 0; i < num_probes; i++) {
|
for (i = 0; i < num_probes; i++) {
|
||||||
probe_list[i] = malloc(sizeof(*(probe_list[i])));
|
probe_list[i] = malloc(sizeof(*(probe_list[i])));
|
||||||
expr = config_setting_get_string_elem(probes, i);
|
expr = config_setting_get_string_elem(probes, i);
|
||||||
res = regcomp(probe_list[i], expr, 0);
|
res = regcomp(probe_list[i], expr, REG_EXTENDED);
|
||||||
if (res) {
|
if (res) {
|
||||||
err = malloc(errsize = regerror(res, probe_list[i], NULL, 0));
|
err = malloc(errsize = regerror(res, probe_list[i], NULL, 0));
|
||||||
regerror(res, probe_list[i], err, errsize);
|
regerror(res, probe_list[i], err, errsize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user