Merge pull request #3250 from airween/v2/literalbuildfix

fix: compilation error
This commit is contained in:
Ervin Hegedus
2024-09-04 10:55:02 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ jobs:
- name: autogen.sh - name: autogen.sh
run: ./autogen.sh run: ./autogen.sh
- name: configure ${{ matrix.configure.label }} - name: configure ${{ matrix.configure.label }}
run: ./configure --enable-assertions ${{ matrix.configure.opt }} run: ./configure --enable-assertions ${{ matrix.configure.opt }} 'CFLAGS=-Werror=format-security'
- uses: ammaraskar/gcc-problem-matcher@master - uses: ammaraskar/gcc-problem-matcher@master
- name: make - name: make
run: make -j `nproc` run: make -j `nproc`

View File

@@ -472,8 +472,8 @@ char *update_rule_target_ex(modsec_rec *msr, msre_ruleset *ruleset, msre_rule *r
end: end:
if (my_error_msg) { if (my_error_msg) {
if (msr) msr_log(msr, 9, my_error_msg); if (msr) msr_log(msr, 9, "%s", my_error_msg);
else ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, my_error_msg); else ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, "%s", my_error_msg);
} }
if (target_list != NULL) free(target_list); if (target_list != NULL) free(target_list);
if (replace != NULL) free(replace); if (replace != NULL) free(replace);