Squashed commit of the following:
commit
589b55a368214f4286f435e8d9d92ce2889624f4
Author: Tom Peters <thopeter@cisco.com>
Date: Fri Jul 24 17:59:43 2020 -0400
http_inspect: reduce memory used by partial inspections
p->set_detect_limit(session_data->detect_depth_remaining[source_id]);
}
- const bool buf_owner = !session_data->partial_flush[source_id];
- if (!process(p->data, p->dsize, p->flow, source_id, buf_owner))
+ if (!process(p->data, p->dsize, p->flow, source_id, true))
disable_detection(p);
#ifdef REG_TEST
if (session_data->partial_flush[source_id])
{
// Store the data from a partial flush for reuse
- partial_buffer = buffer;
+ partial_buffer = new uint8_t[buf_size];
+ memcpy(partial_buffer, buffer, buf_size);
partial_buffer_length = buf_size;
partial_raw_bytes += total;
}