mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +03:00
Avoids string copy by working with pointers while resolving variables
This commit is contained in:
@@ -45,7 +45,10 @@ void TimeHour::evaluateInternal(Transaction *transaction,
|
||||
localtime_r(&timer, &timeinfo);
|
||||
strftime(tstr, 200, "%H", &timeinfo);
|
||||
|
||||
l->push_back(new collection::Variable("TIME_HOUR", std::string(tstr)));
|
||||
transaction->m_variableTimeHour.assign(tstr);
|
||||
|
||||
l->push_back(new collection::Variable(&m_retName,
|
||||
&transaction->m_variableTimeHour));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user