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 TimeYear::evaluateInternal(Transaction *transaction,
|
||||
localtime_r(&timer, &timeinfo);
|
||||
strftime(tstr, 200, "%Y", &timeinfo);
|
||||
|
||||
l->push_back(new collection::Variable("TIME_YEAR", std::string(tstr)));
|
||||
transaction->m_variableTimeYear.assign(tstr);
|
||||
|
||||
l->push_back(new collection::Variable(&m_retName,
|
||||
&transaction->m_variableTimeYear));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user