Skip to content

Commit 771fd4e

Browse files
committed
modsecurity: fix segfault when logging conf error (closes owasp-modsecurity#87)
1 parent 29f6d1e commit 771fd4e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ngx_http_modsecurity_module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ ngx_http_modsecurity_set_rules(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
329329
if (rc < 0) {
330330
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
331331
"Failed to load the rules: \"%V\": %s",
332-
value[1], error);
332+
&value[1], error);
333333
free((char *)error);
334334
return NGX_CONF_ERROR;
335335
}
@@ -371,7 +371,7 @@ ngx_http_modsecurity_set_rules_file(ngx_conf_t *cf, ngx_command_t *cmd,
371371
if (rc < 0) {
372372
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
373373
"Failed to load the rules from file %V: %s",
374-
value[1], error);
374+
&value[1], error);
375375
free((char *)error);
376376
return NGX_CONF_ERROR;
377377
}
@@ -415,7 +415,7 @@ ngx_http_modsecurity_set_rules_remote(ngx_conf_t *cf, ngx_command_t *cmd,
415415
if (rc < 0) {
416416
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
417417
"Failed to load the remote rules %V %V: %s",
418-
value[1], value[2], error);
418+
&value[1], &value[2], error);
419419
free((char *)error);
420420
return NGX_CONF_ERROR;
421421
}

0 commit comments

Comments
 (0)