Skip to content

Commit 61f2ff1

Browse files
author
Felipe Zimmerle
committed
Fix: avoids crash if UNIQUE_ID is not set
Issue #46
1 parent 60be4aa commit 61f2ff1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.0.x - YYYY-MMM-DD (To be released)
22
-------------------------------------
33

4+
- Fix: avoids crash if UNIQUE_ID is not set
5+
[Issue #46 - @Goron1606, @victorhora, @zimmerle]
46
- Proposed fix for msc_process_request_body call too early
57
[Issue #22 - @victorhora]
68
- Adds make install to the build system

src/mod_security3.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static msc_t *create_tx_context(request_rec *r) {
146146

147147
msr->r = r;
148148
unique_id = getenv("UNIQUE_ID");
149-
if (unique_id != NULL || strlen(unique_id) > 0) {
149+
if (unique_id != NULL && strlen(unique_id) > 0) {
150150
msr->t = msc_new_transaction_with_id(msc_apache->modsec,
151151
(Rules *)z->rules_set, unique_id, (void *)r);
152152
} else {

0 commit comments

Comments
 (0)