Skip to content

Commit f5b47a8

Browse files
author
Felipe Zimmerle
committed
Duplicates the url variable in the disruptive action
The log message needs to be freed by the consumer. Doing the same with the url to keep the API consistent.
1 parent c3a0d8d commit f5b47a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/transaction.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,9 @@ int Transaction::processLogging() {
12971297
*/
12981298
bool Transaction::intervention(ModSecurityIntervention *it) {
12991299
if (m_it.disruptive) {
1300-
it->url = m_it.url;
1300+
if (m_it.url) {
1301+
it->url = strdup(m_it.url);
1302+
}
13011303
it->disruptive = m_it.disruptive;
13021304
it->status = m_it.status;
13031305

0 commit comments

Comments
 (0)