We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5431b22 commit 2dc44e9Copy full SHA for 2dc44e9
1 file changed
plugin/action/cardinality/cardinality.go
@@ -265,6 +265,7 @@ func (p *Plugin) Do(event *pipeline.Event) pipeline.ActionResult {
265
p.buf = p.buf[:0]
266
p.buf = p.keys.appendTo(p.buf)
267
prefixKey := make([]byte, len(p.buf))
268
+ // make an independent copy so prefixKey won't be corrupted when p.buf is reused or modified.
269
copy(prefixKey, p.buf)
270
271
keysCount := p.cache.CountPrefix(string(prefixKey))
0 commit comments