summaryrefslogtreecommitdiff
path: root/src/sp_pcre_compat.c
diff options
context:
space:
mode:
authorjvoisin2018-10-06 16:15:00 +0000
committerGitHub2018-10-06 16:15:00 +0000
commitaa550b9abadc109a2c89a7cd6dd047ac2a953027 (patch)
tree1892e9ce8f833f3f13278cd424368fe1b5e26d91 /src/sp_pcre_compat.c
parent228fadf307b167a22ad6ec760f3b2ee2e9f2fee3 (diff)
Bump a bit the coverage
* `setcookie` doesn't always return `true` anymore * clang-format * Cookies with invalid decryption are dropped, but the request isn't anymore * faulty unserialize are now dumpable
Diffstat (limited to 'src/sp_pcre_compat.c')
-rw-r--r--src/sp_pcre_compat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c
index d58d0c4..233ddc0 100644
--- a/src/sp_pcre_compat.c
+++ b/src/sp_pcre_compat.c
@@ -10,7 +10,7 @@ sp_pcre* sp_pcre_compile(const char* const pattern) {
10 PCRE2_SIZE erroroffset; 10 PCRE2_SIZE erroroffset;
11 ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, 11 ret = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED,
12 PCRE2_CASELESS, &errornumber, &erroroffset, NULL); 12 PCRE2_CASELESS, &errornumber, &erroroffset, NULL);
13 pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error)); 13 pcre2_get_error_message(errornumber, pcre_error, sizeof(pcre_error));
14#else 14#else
15 const char* pcre_error = NULL; 15 const char* pcre_error = NULL;
16 int erroroffset; 16 int erroroffset;
@@ -46,7 +46,9 @@ bool ZEND_HOT sp_is_regexp_matching_len(const sp_pcre* regexp, const char* str,
46#else 46#else
47 if (ret != PCRE_ERROR_NOMATCH) { 47 if (ret != PCRE_ERROR_NOMATCH) {
48#endif 48#endif
49 // LCOV_EXCL_START
49 sp_log_err("regexp", "Something went wrong with a regexp (%d).", ret); 50 sp_log_err("regexp", "Something went wrong with a regexp (%d).", ret);
51 // LCOV_EXCL_STOP
50 } 52 }
51 return false; 53 return false;
52 } 54 }