diff options
| author | jvoisin | 2017-10-10 14:47:56 +0200 |
|---|---|---|
| committer | jvoisin | 2017-10-10 14:47:56 +0200 |
| commit | ef1cb7661ed577039c7fa6caea7490330237f091 (patch) | |
| tree | 4ac7652b259a99cec284bc8929f2b75fde4112b8 /src/sp_config_keywords.c | |
| parent | 6c458dcf33ae2b1fb17bf9104ab0bb4fa6f23910 (diff) | |
Bump coverage, and fix a segfault on trace matching
Diffstat (limited to 'src/sp_config_keywords.c')
| -rw-r--r-- | src/sp_config_keywords.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 8fba868..e71463a 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -128,13 +128,16 @@ int parse_cookie_encryption(char *line) { | |||
| 128 | "on line %zu without having set the `.encryption_key` option in" | 128 | "on line %zu without having set the `.encryption_key` option in" |
| 129 | "`sp.global`: please set it first.", sp_line_no); | 129 | "`sp.global`: please set it first.", sp_line_no); |
| 130 | return -1; | 130 | return -1; |
| 131 | } else if (0 == strlen(name)) { | ||
| 132 | sp_log_err("config", "You must specify a cookie name to encrypt on line " | ||
| 133 | "%zu.", sp_line_no); | ||
| 134 | return -1; | ||
| 131 | } | 135 | } |
| 132 | 136 | ||
| 133 | if (name) { | 137 | zend_hash_str_add_empty_element( |
| 134 | zend_hash_str_add_empty_element( | 138 | SNUFFLEUPAGUS_G(config).config_cookie_encryption->names, name, |
| 135 | SNUFFLEUPAGUS_G(config).config_cookie_encryption->names, name, | 139 | strlen(name)); |
| 136 | strlen(name)); | 140 | |
| 137 | } | ||
| 138 | return SUCCESS; | 141 | return SUCCESS; |
| 139 | } | 142 | } |
| 140 | 143 | ||
