streaming: fix region buf_offset update

If region wasn't the first region, the buf_offset could get out of
sync.

Bug: #6041.
pull/8904/head
Victor Julien 3 years ago
parent facdbca95b
commit b401fe5259

@ -499,9 +499,9 @@ static int SBBUpdate(StreamingBuffer *sb, const StreamingBufferConfig *cfg,
#ifdef DEBUG
SBBPrintList(sb);
#endif
if (sbb->offset == sb->region.stream_offset) {
SCLogDebug("insert at head");
sb->region.buf_offset = sbb->len;
if (sbb->offset == region->stream_offset) {
SCLogDebug("insert at region head");
region->buf_offset = sbb->len;
}
return 0;
}

Loading…
Cancel
Save