Skip to content

Commit c519ab4

Browse files
committed
Treat possible null values too
1 parent d3f6338 commit c519ab4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apache2/re_operators.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,15 +2320,15 @@ static int msre_op_detectSQLi_execute(modsec_rec *msr, msre_rule *rule, msre_var
23202320
}
23212321
break;
23222322
case LIBINJECTION_RESULT_ERROR:
2323-
set_match_to_tx_safe(msr, capture, var->value, var->value_len, 0);
2323+
set_match_to_tx_safe(msr, capture, var->value ? var->value : "", var->value_len, 0);
23242324
*error_msg = apr_psprintf(msr->mp, "libinjection parser error");
23252325
if (msr->txcfg->debuglog_level >= 9) {
23262326
msr_log(msr, 9, "ISSQL: libinjection's input '%s' caused a parser error",
23272327
log_escape_ex(msr->mp, var->value, var->value_len));
23282328
}
23292329
break;
23302330
default:
2331-
set_match_to_tx_safe(msr, capture, var->value, var->value_len, 0);
2331+
set_match_to_tx_safe(msr, capture, var->value ? var->value : "", var->value_len, 0);
23322332
*error_msg = apr_psprintf(msr->mp, "unexpected libinjection result: (%d)", issqli);
23332333
if (msr->txcfg->debuglog_level >= 9) {
23342334
msr_log(msr, 9, "ISSQL: libinjection's input '%s' caused an unexpected result: (%d)",

0 commit comments

Comments
 (0)