From aa550b9abadc109a2c89a7cd6dd047ac2a953027 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 6 Oct 2018 16:15:00 +0000 Subject: 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--- src/sp_var_parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sp_var_parser.c') diff --git a/src/sp_var_parser.c b/src/sp_var_parser.c index b57386e..72cbc12 100644 --- a/src/sp_var_parser.c +++ b/src/sp_var_parser.c @@ -31,7 +31,7 @@ static bool is_var_name_valid(const char *name) { regexp_const = sp_pcre_compile(REGEXP_CONST); } if (NULL == regexp_var || NULL == regexp_const) { - return false; + return false; // LCOV_EXCL_LINE } if ((false == sp_is_regexp_matching(regexp_var, name)) && (false == sp_is_regexp_matching(regexp_const, name))) { @@ -64,8 +64,10 @@ static int create_var(sp_tree *tree, const char *restrict value, var_node->type = VAR; } if (!(var_node->value = pestrndup(value, value_len, 1))) { + // LCOV_EXCL_START sp_log_err("config", "Can't allocate a strndup"); return -1; + // LCOV_EXCL_STOP } if (var_node->type != INTERPRETED_STRING && !is_var_name_valid(var_node->value)) { -- cgit v1.3