On Tue, Feb 07, 2023 at 07:45:20PM +0100, Robin Jarry wrote:
> If a telemetry endpoint callback returns 0 without modifying the data
> object, output_json() may be called with undefined contents in data.
> This can cause crashes and/or worse (double free, etc.).
>
> Reset data before passing it to the endpoint callbacks.
>
> Fixes: 6dd571fd07c3 ("telemetry: introduce new functionality")
> Cc: [email protected]
>
> Signed-off-by: Robin Jarry <[email protected]>
> ---
> lib/telemetry/telemetry.c | 2 ++
> 1 file changed, 2 insertions(+)
>
This is also fixed by patch
http://patches.dpdk.org/project/dpdk/patch/[email protected]/
While both work the same way, I think I prefer the fix to set "= {0}" on
init rather than explicit memset.
/Bruce