]> git.ipfire.org Git - thirdparty/collectd.git/commit
write_riemann plugin: Terminate `riemann_event_set` arguments with `RIEMANN_EVENT_FIE...
authorFlorian Forster <octo@collectd.org>
Thu, 11 Jan 2024 19:35:30 +0000 (20:35 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 15 Jan 2024 13:56:33 +0000 (14:56 +0100)
commitcfdf526f1b4867d8952fc6d37b85f0d426a78fc7
tree3b32ac9979048dc0e5d9f87dc5b1940433abd6ea
parent66594f05805cd3e59d8556774fc7ec0ae49db6ff
write_riemann plugin: Terminate `riemann_event_set` arguments with `RIEMANN_EVENT_FIELD_NONE`.

`riemann_event_set` is a variadic function, that means it accepts a variable
number of arguments. That means it needs some way to determine – at runtime
– how many arguments there are. It appears to be doing so by using
`RIEMANN_EVENT_FIELD_NONE` to indicate the last element in the argument
list. Unfortunately I was unable to find the library's documentation and
code and could not verify this.

That means that the argument list passed to `riemann_event_set` was not
always terminated, causing it to read past where it was supposed to and
adding random crap into the message it crafted.

Issue: #4050
src/write_riemann.c