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:17 +0000 (14:26 -0400)
commitc651e8720fb4cf5751a7d152ab7067025b6fc6a7
tree9d73840310597d8e462fbf5b24eee3956c6e429d
parentf8efdde9fd8fa32c4313c2848cc6bcb42a3d5871
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.024335 seconds and 4 git commands to generate.