Merge remote-tracking branch 'origin/topic/justin/conn-remove-empty-string-allocation'

* origin/topic/justin/conn-remove-empty-string-allocation:
  Avoid allocation of 0 length strings on new conns
This commit is contained in:
Robin Sommer 2021-09-23 12:24:06 +02:00
commit c5ebe299b1
3 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,12 @@
4.2.0-dev.205 | 2021-09-23 12:24:06 +0200
* Avoid allocation of duplicate zero-length strings for new
connections. (Justin Azoff, Corelight)
* Sanity-check the method passed into ActiveHTTP. Reported by Pierre
Gaulon. (Robin Sommer, Corelight)
4.2.0-dev.203 | 2021-09-21 15:16:49 -0700 4.2.0-dev.203 | 2021-09-21 15:16:49 -0700
* Sanitize log files names before they go into system(). (Robin Sommer, Corelight) * Sanitize log files names before they go into system(). (Robin Sommer, Corelight)

View file

@ -1 +1 @@
4.2.0-dev.203 4.2.0-dev.205

View file

@ -271,7 +271,9 @@ const RecordValPtr& Connection::GetVal()
conn_val->AssignTime(3, start_time); // ### conn_val->AssignTime(3, start_time); // ###
conn_val->AssignInterval(4, last_time - start_time); conn_val->AssignInterval(4, last_time - start_time);
conn_val->Assign(6, history);
if ( history.size() )
conn_val->Assign(6, history);
conn_val->SetOrigin(this); conn_val->SetOrigin(this);