pcre2 mixing of length and compile options
loqs opened this issue · 2 comments
loqs commented
The second option to pcre2_compile is the length of the string or PCRE2_ZERO_TERMINATED.
The third field is the option bits.
ettercap/plug-ins/sslstrip/sslstrip.c
Line 244 in 975727e
has option bits PCRE2_MULTILINE|PCRE2_CASELESS in the second field and sets no options in the third. I believe PCRE2_MULTILINE|PCRE2_CASELESS should be moved to the third field.
The following also have the same issue but in these cases I believe PCRE2_MULTILINE|PCRE2_CASELESS should be dropped instead of moved, so the code matches pcre_compile.
Line 1546 in 975727e
ettercap/utils/etterfilter/ef_encode.c
Line 250 in 975727e
ettercap/utils/etterfilter/ef_encode.c
Line 284 in 975727e
LocutusOfBorg commented
also #1217 , there was another PCRE2_MULTILINE used and not in sync with pcre_compile