When InspectionBufferGet gets called with base_id
Later InspectionBufferSetup must also be called with base_id
In case there were transforms, we had base_id != list_id
Not calling InspectionBufferSetup with the right id
resulted in leaving a dangling pointer,
because it was not added to det_ctx->inspect.to_clear_queue
Bug: #4681.
StreamingBufferGetDataAtOffset(body->sb,
&data, &data_len, offset);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, base_id, buffer, data, data_len);
buffer->inspect_offset = offset;
body->body_inspected = body->content_len_so_far;
SCLogDebug("body->body_inspected now: %" PRIu64, body->body_inspected);
StreamingBufferGetDataAtOffset(body->sb,
&data, &data_len, offset);
- InspectionBufferSetup(det_ctx, list_id, buffer, data, data_len);
+ InspectionBufferSetup(det_ctx, base_id, buffer, data, data_len);
buffer->inspect_offset = offset;
body->body_inspected = body->content_len_so_far;
SCLogDebug("body->body_inspected now: %" PRIu64, body->body_inspected);