Fix: event notification capture error handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 27 Sep 2022 20:14:26 +0000 (16:14 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 28 Sep 2022 18:26:28 +0000 (14:26 -0400)
commitd9c66e5afd887aca6f8f914ec469b53109d9bd7a
treec228a1a6b7faf200b554a8fbf9973b05033b061f
parent84cf1a01466a9056e9f393c1636fc928ab799568
Fix: event notification capture error handling

When the captured fields end up taking more than

  PIPE_BUF - sizeof(struct lttng_ust_abi_event_notifier_notification) - 1

bytes of space for the msgpack message, the notification append capture
fails.

Currently, the result is that the msgpack buffer will contain a (likely
corrupted) truncated msgpack data.

Handle those overflow errors, and when they are encountered, reset the
msgpack writer position to skip the problematic captured field entirely.

Change-Id: I7ba1bf06aa72512fc73211a1d8ae6823d0e8d7ff
src/common/msgpack/msgpack.c
src/common/msgpack/msgpack.h
src/lib/lttng-ust/event-notifier-notification.c
This page took 0.02602 seconds and 4 git commands to generate.